Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function creates a pointer moniker based on a pointer to an object.

Syntax

WINOLEAPI CreatePointerMoniker(
  LPUNKNOWN 
punk,
  LPMONIKER FAR* 
ppmk
);

Parameters

punk

[in] Pointer to an IUnknowninterface on the object to be identified by the resulting moniker.

ppmk

[out] Address of IMoniker* pointer variable that receives the interface pointer to the new pointer moniker. When successful, the function has called IUnknown::AddRefon the moniker and the caller is responsible for calling IUnknown::Release. When an error occurs, the returned interface pointer has a NULL value.

Return Value

This function supports the standard return values E_OUTOFMEMORY and E_UNEXPECTED, as well as the following:

S_OK

The pointer moniker was created successfully.

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.

To determine whether the platform supports this function, see Determining Supported COM APIs.

Requirements

Header objbase.h
Library ole32.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

COM Functions