Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does CLSIDFromProgID() look in the registry?

MS' docs simply say:

Given a ProgID, CLSIDFromProgID looks up its associated CLSID in the registry.

But where exactly does it look? I have a weird issue where a wrong CLSID is being returned and I want to follow where this function is looking to help narrow down where the problem is.

like image 283
Mr. Boy Avatar asked Nov 16 '12 12:11

Mr. Boy


1 Answers

The lookup goes through the application's manifest and its dependant assembly manifests. This is done to support registration-free COM.

If there's no application manifest or if none of the dependant assembly manifests declare your class in a comClass or clrClass XML element, the lookup defaults to the registry, which will check HKEY_CLASSES_ROOT\<ProgID>1 with a string value named CLSID.


1.HKEY_CLASSES_ROOT is a mix of HKEY_CURRENT_USER\Software\Classes and HKEY_LOCAL_MACHINE\Software\Classes.

like image 110
acelent Avatar answered Oct 14 '22 18:10

acelent