Note:
Using CoGetClassObject, to create multiple objects through a class object for which there is a CLSID in the system registry
Single threaded apartment
For instance:
hresult = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
IClassFactory *pIClassFactory;
hresult = CoGetClassObject (clsid, CLSCTX_LOCAL_SERVER, NULL, IID_IClassFactory, (LPVOID *)&pIClassFactory);
hresult = pIClassFactory->QueryInterface (IID_IUnknown, (LPVOID *)&pUnk);
hresult = pUnk->QueryInterface (__uuidof(IExample), (LPVOID *)&pISimClass);
Note:
- E_NOINTERFACE is returned
- *ppvObject is set to NULL
Question:
- How can I confirm, that it is indeed registered - if this is the problem?