How do I create interface methods using .tlb types in VS C++?
- by Steven
Background:
The .TLB file contains interfaces written in language 'X'. I don't have .h, .idl, .tlh, or any other header files - just the .TLB file. Language 'X' does not export compatible .h, .idl, etc.
I use the VS wizard to add an ATL simple object to my ATL project.
I want to add a method to the interface of my simple ATL object that uses one of the .TLB defined types for a parameter.
// Something like the following in the .idl file:
interface ISomeInterface : IUnknown {
HRESULT SomeMethod([in] ITypeFromTLB* aVal); // ITypeFromTLB declared in .TLB file.
};
How can I do this? I'm hoping for a wizard, or a line in the .idl interface declaration that would bring in the .tlb information. midl's include (no .tlb), import (no tlb), and importlib (library only) don't seem to provide a solution (I need proxy/stub to be working, so I cannot put this inside the library declaration with the importlib command).
Thanks.