Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ProgID or CLSID from filename

Status
Not open for further replies.

gkfox

Programmer
May 28, 2001
4
US
I am in need of a utility routine that will obtain the CLSID's or ProgID's in a COM dll, from the full pathname of the DLL.

I have used the registry to get the location from the CLSID and go between ProgID and CLSID, but I figure you need to open the COM interface itself to do this. I am in VB and don't know ho to go about this, so I wonder if there is a sample out there.

Thank you
 
I don't know of a pretty way to do this.

You'll probably have to use RegEnumKey on the entire CLSID branch of the registry to find the key whose InProcServer32 value matches your path (in the case of DLL), or LocalServer32 (in the case of an EXE).

From that you'll have the CLSID, from which you can find the ProgID.

Don't forget to call RegCloseKey when you're done with a key.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top