IClassActivator::GetClassObject

Retrieves a class object. Similar to CoGetClassObject.

HRESULT GetClassObject(

REFCLSID *pClassID

//CLSID of class object desired

DWORD dwClsContext

//Values from CLSCTX

LCID locale

//LCID constant

REFIID riid

//IID of requested interface

void ** ppv

//Indirect pointer to requested interface

);

Parameter

pClassID
[in] Points to the CLSID that Identifies the class whose class object is to be retrieved.
dwClsContext
[in] The context in which the class is expected to run; values are taken from the CLSCTX enumeration.
locale
[in] Any LCID constant as defined in WINNLS.H.
riid
[in] IID of the interface on the object to which a pointer is desired.
ppv
[out] On successful return, an indirect pointer to the requested interface.

Return Values

This method supports the standard return value E_FAIL, as well as the following:

S_OK
The CLSID was successfully returned.

Remarks

This method returns the class identifier (CLSID) for an object, used in later operations to load object-specific code into the caller’s context.

See Also

CoGetClassObject