-
find referenced libraries in typelib in VB
I am attempting to create a VB program that creates IDL source from an
existing typelib (e.g., a DLL compiled by VB).
I am having trouble determining which importlib() statements are required.
I am using the TypeLibInfo COM objects (TlbInf32.dll -- help file and some
samples are available on MSDN to download).
OLEView can determine the referenced libraries, but the sample source code
version predates that and the code is not included, so I can't see what they
are doing ;-(
I'm guessing that I have to enumerate through all TypeInfos, their
interfaces, and all the parameters of their memebers, and grow a list of
types I find that are not standard. But how do I get from that information
to the name of the file for an importlib statement?
E.g., I find an Interface IDispatch with GUID
{00020400-0000-0000-C000-000000000046}, but how do Iget from this
information to "stdole2.tlb"?
-
Re: find referenced libraries in typelib in VB
> I am attempting to create a VB program that creates IDL source from an
> existing typelib (e.g., a DLL compiled by VB).
I did a type library decompiler using the ITypeInfo and ITypeLib interfaces
(it's included with the olelib.tlb in my site).
With the tlbinf32 you should check for external types
(VarTypeInfo.IsExternalType). If the type is external, then it is defined in
another type library. Using VarTypeInfo.TypeLibInfoExternal you get a
reference to that type library, then just call ContainingFile to get the
type library file name.
--
Eduardo A. Morcillo
http://www.domaindlx.com/e_morcillo
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks