Example: lrc_CoCreateInstance

This extended example shows how to used GUID to get the PROGID of the COM object to be created, and how to initialize all other necessary parameters.

GUID pClsid = lrc_GUID("student.student.1");
IUnknown * pUnkOuter =(IUnknown*)NULL;
unsigned long dwClsContext = lrc_ulong("7");
GUID riid = IID_IUnknown;
lrc_CoCreateInstance(&pClsid, pUnkOuter, dwClsContext, &riid,(void**)&IUnknown_0, CHECK_HRES);