I have a situation in which a managed DLL calls some unmanaged DLL. I know the CLSID of the unmanaged DLL, is there any way to find out what binary file houses that CLSID?<
Based on BobbyShaftoe reply we can build a simple vbs script that reads that registry for us:
Dll_RegPath = "HKEY_CLASSES_ROOT\CLSID\<GUID>\InProcServer32\"
Paste the following to "test.vbs"
Sub Main
' used to find location of "System.Collections.ArrayList" progid dll
Const csGUID = "{6896B49D-7AFB-34DC-934E-5ADD38EEEE39}"
MsgBox srGetDllPathByGUID(csGUID)
End Sub
Function srGetDllPathByGUID( sGUID )
Const csRegPath = "HKEY_CLASSES_ROOT\CLSID\<GUID>\InProcServer32\"
Dim oShell: Set oShell = CreateObject("WScript.Shell")
Dim sReg: sReg = Replace( csRegPath, "<GUID>", sGUID ) ' build str
srGetDllPathByGUID = oShell.RegRead(sReg)
Set oShell = Nothing ' clean up
End Function
Call Main
You can also find ProgId by:
ProgID_RegPath = "HKEY_CLASSES_ROOT\CLSID\<GUID>\ProgID\"
Can you not just search for it in the registry using regedit and look for the binary path.
Normaly, you can just go to:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\"GUID"
And find a key called "InProcServer32" for instance and there will be the default value that has the DLL. This is one simple way to do it.