If the type library is empty, then you cannot find type information in the COM library.
You need at least a coclass style entry in typelib to find an implementation of IUnknown .
If you have this, you can actually instantiate the class and then call QueryInterface in IUnknown for IDispatch (if one exists).
If an IDispatch interface exists, you can call GetTypeInfo to get information about the implemented interfaces.
If you need to make late calls in IDispatch, you will need to call the Invoke method.
Note that you are mentioning a type library, but it is common practice for COM servers to process the implementation of a type library in a DLL, which is an implementation of the types represented in the library. Are you sure you have not checked this yet? Or are you sure you have a type library, and is it really empty?
If the lib type is really empty and the dll does not contain it, it is entirely possible that the lib type was "private" in the sense that other clients were compiled against it. COM does not need the lib type at runtime. The template for demonstrating the implementation of the IClassFactory interface is to export a standard DLL function with a well-known signature.
You can easily call LoadLibrary , then call GetProcAddress and pass the result to IClassFactory. From there, they will use the private GUID and IID that they know (not from the type library), as well as the COM interfaces that they have identified privately and work from there.
The only reason I can think of something like this is a form of obfuscation and / or a solution to privacy / security problems, only allowing customers whom the server manufacturer approves of calling it.
This will not help you, but it may explain why you see a type library that has no information, and at the same time see that other clients are consuming the library.
casperOne
source share