IGlobalInterfaceTable::RegisterInterfaceInGlobal returns zero cookie

170 views Asked by At

I'm trying to repackage a proprietary app that consists of several libraries, COM interfaces and a COM automation server.

My stripped down distribution doesn't work.

Using the function call monitor (RohitLab API monitor), I've established that a call to IGlobalInterfaceTable::RegisterInterfaceInGlobal returns a zero value for the cookie in the stripped version; while in the correct full install, it always returns 256.

The documentation says that "The value of an invalid cookie is 0."

It is very interesting, but the application ignores the zero return value and uses 256 instead (always?) for IGlobalInterfaceTable::GetInterfaceFromGlobal, and doesn't work later, because it's trying to connect the NULL pointer returned for the interface to other COM objects.

It doesn't crash though, just wouldn't work as expected.

Question: Why would RegisterInterfaceInGlobal return a zero value? The dll which contains type library for this interface is registered using regsvr32. Btw, it seems to load another dll which is also a COM library, but without a type library in it.

0

There are 0 answers