Jump to content

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


sulfurious
 Share

Recommended Posts

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" ;
;"c:\windows\system32\amstream.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)
    Next
EndIf

later,

Sul

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...