CoCreateInstance function ole32
Creates a single uninitialized object of the class associated with a specified CLSID. Call CoCreateInstance when you want to create only one object on the local system. To create a single object on a remote system, call the CoCreateInstanceEx function. To create multiple objects based on a single CLSID, call the CoGetClassObject function.
HRESULT CoCreateInstance(
REFCLSID rclsid,
LPUNKNOWN pUnkOuter,
DWORD dwClsContext,
REFIID riid,
LPVOID *ppv
);
Implementation
int CoCreateInstance(
Pointer<GUID> rclsid,
Pointer<COMObject> pUnkOuter,
int dwClsContext,
Pointer<GUID> riid,
Pointer<Pointer> ppv,
) => _CoCreateInstance(rclsid, pUnkOuter, dwClsContext, riid, ppv);