Share this page

# 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);

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: