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.
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
comClassorclrClassXML element, the lookup defaults to the registry, which will checkHKEY_CLASSES_ROOT\<ProgID>1 with a string value namedCLSID.1.
HKEY_CLASSES_ROOTis a mix ofHKEY_CURRENT_USER\Software\ClassesandHKEY_LOCAL_MACHINE\Software\Classes.