Does anybody know how to find out the GUID of a particular (compiled) ActiveX DLL?
Printable View
Does anybody know how to find out the GUID of a particular (compiled) ActiveX DLL?
Select TypeLib Information in the Project References tab and paste the following code into form_load, this gets the GUID for stdole2.tlb so just change the path to your DLL. You can use this object with a prog id (i.e. "Excel.Application") but I can't remember off the top of my head how to do it but there is info on this on msdn online, just search for TypeLibInfo
Private Sub Form_Load()
Dim objTL As New TLI.TypeLibInfo ' Info obj about type library
objTL.ContainingFile = "c:\winnt40\system32\stdole2.tlb"
Debug.Print objTL.Guid
End Sub
That helped a lot.
Incidentally, is it possible to get at this information without using VB (through some utility or something)?
CLSID and so on are in he REgistry. Start REGEDIT, then use the search facility, look for the name you gave your interface, or whatever other item you're looking for.
All of it is in
HKEY_CLASSES_ROOT
But what if you have different versions of a dll on your machine abd you want to see which version is registered?
If you've got visual studio or C++ you can use the OLE view application. It scans through your registry and type library information and presents you a GUI to browse all registered COM components.