Wednesday, September 15, 2010

CoCreatelnstance?


CoCreatelnstance?

Call this method to create an point of the class associated with a specified Class ID or Program ID.



Prototype:

HRESULT CoCreateInstance(

LPCOLESTR szProgID,

LPUNKNOWN pUnkOuter = NULL,

DWORD dwClsContext = CLSCTX_ALL

) throw( );



HRESULT CoCreateInstance(

REFCLSID rclsid,

LPUNKNOWN pUnkOuter = NULL,

DWORD dwClsContext = CLSCTX_ALL

) throw( );



Returns: S_OK on nouns, or REGDB_E_CLASSNOTREG, CLASS_E_NOAGGREGATION, or E_NOINTERFACE on failure.

No comments:

Post a Comment