Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CoCreateinstance() does not return....It hangs

18 views
Skip to first unread message

aber

unread,
Jun 28, 2007, 1:39:31 PM6/28/07
to
Hi All,

I am trying to create an instance of an object using
CoCreateinstance() method.
The CLSID is correct.
The parameter dwClsContext = CLSCTX_INPROC_SERVER |
CLSCTX_INPROC_HANDLER

The function blocks and does not returns.

Instead of calling CoCreateInstance(), I tried it this way:
calling CoGetClassObject() first and then calling CreateInstance()
on the returned class factory.

HRESULT hRres;
CComPtr<IClassFactory> pClassFactory;

hRes = ::CoGetClassObject(............,(LPVOID *) &pClassFactory);
......

pClassFactory->CreateInstance(...........);

CoGetClassObject() returns S_OK, but the CreateInstance() method
hangs.

Has some come across this problem earlier?
Any help or pointer towards the cause of the problem would be greatly
appreciated.

Thanks in advance.

Warm Regards.

0 new messages