CreatePointerMoniker function (objbase.h)

Creates a pointer moniker based on a pointer to an object.

Syntax

HRESULT CreatePointerMoniker(
  [in, optional] LPUNKNOWN punk,
  [out]          LPMONIKER *ppmk
);

Parameters

[in, optional] punk

A pointer to an IUnknown interface on the object to be identified by the resulting moniker.

[out] ppmk

The address of an IMoniker* pointer variable that receives the interface pointer to the new pointer moniker. When successful, the function has called AddRef on the moniker and the caller is responsible for calling Release. When an error occurs, the returned interface pointer has a NULL value.

Return value

This function can return the standard return values E_OUTOFMEMORY, E_UNEXPECTED, and S_OK.

Remarks

A pointer moniker wraps an existing interface pointer in a moniker that can be passed to those interfaces that require monikers. Pointer monikers allow an object that has no persistent representation to participate in a moniker-binding operation.

Pointer monikers are not commonly used, so this function is not often called.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header objbase.h
Library Ole32.lib
DLL Ole32.dll
API set ext-ms-win-com-ole32-l1-1-0 (introduced in Windows 8)

See also

IMoniker