Feb 11 2022 03:34 AM - edited Feb 11 2022 03:36 AM
I work on a plugin-based application that is currently scanning the Windows registry for compatible COM servers that expose certain "Implemented Categories" entries. This works well for "regular" COM servers installed through MSI installers. However, I'm now facing a problem with COM servers installed through MSIX installers that expose COM extension points through the "Packaged COM" catalog as described in https://blogs.windows.com/windowsdeveloper/2017/04/13/com-server-ole-document-support-desktop-bridge.
I've already begun to replace the registry search with ICatInformation::EnumClassesOfCategories that also scans the "Packaged COM" catalog. This seem to work nicely. However, I also need to access the COM class Version for compatibility checking.
Are there any Windows APIs for determining COM class Version that I can use instead of reading it directly from the registry?
Mar 11 2022 09:06 AM
Solution@forderud thank you for your question. I asked some folks to try and get the best answer for you.
The OLE registration APIs (e.g. OleRegGetUserType) can provide the same properties for Packaged COM classes as they do for CLSID keys in the registry. The APIs don’t cover the full set of subkeys/values that are meaningful for CLSIDs though, and in particular not Version (assuming this refers to the Version (COM) - Win32 apps | Microsoft Docs subkey) or InprocServer32/LocalServer32.
For the most part these API omissions are intentional and reflect the intended usage, though the specific rationale varies, e.g.:
Mar 14 2022 01:21 PM