Sign in to follow this  
Followers 0

Get GUID\CLSID of .tlb,.exe,.ocx,.dll

1 post in this topic

This was interesting. It requires the file TLBINF32.dll be in the system path and registered. A pretty neat way to find out those pesky CLSID's of your dll's. Sure beats parsing the registry.

The two commented paths should be on any xp machine.

;"C:\Program Files\Windows Media Player\mpvis.dll" ;

Local $i
$sFileName = ""
$oTypeLib = ObjCreate("TLI.TypeLibInfo")
If IsObj($oTypeLib) Then
    $oTypeLib.ContainingFile = $sFileName
    MsgBox(0,"Tlb Name",$oTypeLib.Name) ; name of TLB (Type Libarary)
    MsgBox(0,"Tlb ID",$oTypeLib.GUID) ; GUID of TLB
    MsgBox(0,"LCID",$oTypeLib.LCID) ; Language / Country
    MsgBox(0,"Maj V.",$oTypeLib.MajorVersion) ; Major Version
    MsgBox(0,"Min V.",$oTypeLib.MinorVersion) ; Minor Version
    For $i = 1 To $oTypeLib.TypeInfoCount
        $oTypeInfo = $oTypeLib.TypeInfos($i)
        If $oTypeInfo.TypeKind = 5 Then MsgBox(0,"CLSID",$oTypeInfo.Name & @CRLF & @CRLF & $oTypeInfo.GUID)



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
Sign in to follow this  
Followers 0