COGetClassObject and 0x80004002 (No such interface supported)
Hi,
In one process I'm calling CoRegisterClassObject(clsid, svcptr,
CLSCTX_LOCAL_SERVER, REGCLS_MULTIPLEUSE, &somecookie). The pointer that I
pass to CoRegisterClassObject implements custom IDispatch derived interface.
As such, the implementation responds properly to QI for IID_IUnknown and
IID_IDispatch. For everything else it returns E_NOINTERFACE.
CoRegisterClassObject returns S_OK.
Now, I have a 2nd process which calls CoGetClassObject(clsid,
CLSCTX_LOCAL_SERVER, 0, IID_IDispatch, svcptr).
This works in 99% of cases\machines (win9x,NT4,win2k+). However, sometimes
CoGetClassObject fails with 0x80004002 (No such interface supported) in 2nd
process.
Does anyone see what's wrong in the above scheme? Should I only ask for
IClassFactory in CoGetClassObject? I don't think that's a requirement. The
CLSID value used in failed case was: dc9745ec-7861-42f9-9896-e83516ff3cc6.
It doesn't seem to overlap with anything. I generate new value dynamically
through CoCreateGUID for process lifetime.
Thank you for any help on this!
date: Tue, 13 Dec 2005 21:59:33 -0500
author: Leon Finker am