Jump to content
trancexx

TYPELIB Viewer

Recommended Posts

trancexx

So, what's this?

It's a tool-script you would use when you want to know details about specific type libraries.

There are some tools available on the net for the job. None written in AutoIt (take this conditionally and search for posts made by doudou). That made me wonder how hard it would be to write one from the scratch.

Turned to be very demanding. :blink:

TypeLib format is not officially or publicly available, at least not to my knowledge. Doing the research I found what's called The Unofficial TypeLib Data Format Specification. Sort of a must read when it comes to understanding the organization of typelib format.

Script I'm posting here is written solely upon that document.

I must also say that I had to do few modifications of some fields because of found inconsistencies in order to get correct readings. Also I'm doing few deliberate shortcuts mostly because of incomplete description within theircorp's document.

What's covered is MSFT type of TypeLib. This obviously means there are more types. Actually one more, called SLTG TypeLib, but this one is very rare (probably less than 1/100 of all TypeLibs).

GUI will certainly look familiar if you have run some of the scripts I posted recently. This time it's a wrapper for edit control.

Main function is called _TLB_TypelibMSFT(). Everything else inside script serves it.

What to learn from it? DllStruct manipulation maybe. But who wants that? ;)

Script:

TLBViewer.au3

Try AutoItX3.dll or wscript.exe or winhttp.dll or shell32.dll or thousand more to see what this really is. Object(s) some more.

Edited by trancexx
  • Like 3

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
JohnOne

The whole code is fascinating to me, and something I will have to study more closely when I understand better.

I've been testing it out on various files and (I dont brandish this word without a warrant) its awsome, absolutey superb.

Top Drawer.

Cheers.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites
trancexx

The whole code is fascinating to me, and something I will have to study more closely when I understand better.

I've been testing it out on various files and (I dont brandish this word without a warrant) its awsome, absolutey superb.

Top Drawer.

Cheers.

It's very hard to follow this kind of code, right?

Thank you for the waves.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
monoceres

I had no idea all this information was available. Interesting.


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites
ValeryVal

Thank you!

It can show the content of interfaces from OWC11.DLL (>8Mb), too.

What is about interface tree creation like TypeLibDocumenter?

:blink:


The point of world view

Share this post


Link to post
Share on other sites
Zedna

Idea:

It would be nice to use RichEdit control instead od Edit and colorize important parts,

for example Names of properties/methods.

Here is example for colorizing in RichEdit by using

_GUICtrlRichEdit_AppendTextColor($hWnd, $sText, $iColor)

Share this post


Link to post
Share on other sites
trancexx

 

Very nice/usefull tool trancexx :x

Five stars from me!

I tested in on CDO.Message: C:\WINDOWS\system32\cdosys.dll

and it works OK and shows also enums,modules, properties/methods descriptions, etc!

 

That tlb is where you can see incompleteness of the document I based this script on.

I've corrected the code. Try it now and you will see what that "module thing" should print.

Edited by trancexx
test

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
step887

First off, I wanted to say that this is amazing and it works great. So thank you.

I have one question, I am working on a cleaner of sorts and if they files are there I have no issues.

but if the files are gone and I have the UUID. Is there a easy way to get the Interface ID?

I know I can RegEmunKey HKEY_LOCAL_MACHINESOFTWAREClassesInterface and compare the default value of sub TypeLib to the UUID. This is slow and I prefer to avoid it if possible.

I do not think I saw a way in your code, but I am not strong with COM objects - so I could have overlook it.

Is this possible?

Thanks in advance.

Edited by step887

Share this post


Link to post
Share on other sites
trancexx

First off, I wanted to say that this is amazing and it works great. So thank you.

I have one question, I am working on a cleaner of sorts and if they files are there I have no issues.

but if the files are gone and I have the UUID. Is there a easy way to get the Interface ID?

I know I can RegEmunKey HKEY_LOCAL_MACHINESOFTWAREClassesInterface and compare the default value of sub TypeLib to the UUID. This is slow and I prefer to avoid it if possible.

I do not think I saw a way in your code, but I am not strong with COM objects - so I could have overlook it.

Is this possible?

Thanks in advance.

I don't know because I'm not sure what you're asking. Could you rephrase that?

The script isn't using registry values nor care if the typelib, coclass or interfaces are registered on the system. It just parses tlb format and interprets the data following the linked specs.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
JLogan3o13

I know this is an older post, but I linked to it from GH & S. Great work, wouldn't expect anything less. Thanks for sharing.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.