CreateClassMoniker function

Creates a class moniker that refers to the specified class.

Syntax

HRESULT CreateClassMoniker(
  REFCLSID  rclsid,
  LPMONIKER *ppmk
);

Parameters

rclsid

A reference to the CLSID of the object type to which this moniker binds.

ppmk

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

Return Value

This function can return the following values.

Return code Description
S_OK
The moniker has been created successfully.
E_INVALIDARG
One or more arguments are invalid.

Remarks

The class moniker will support the binding to a fresh instance of the class identified by the CLSID in rclsid.

Requirements

   
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

See Also

IMoniker