Forum Discussion
forderud80
Oct 17, 2021Copper Contributor
How to query for installed packaged COM extension points?
StackOverflow question: https://stackoverflow.com/questions/69556384/how-to-query-for-installed-packaged-com-extension-points
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/ . These COM servers can still be instantiated through CoCreateInstance, but RegOpenKey/RegEnumKey searches aren't able to detect their presence.
I've already investigated using PackageManager.FindPackagesForUser to detect installed packages and parsing the associated manifest files for <com:ComServer> tags. However, it seem like a rather clunky approach to me. Having some sort of Windows API for querying the "Packaged COM" catalog for installed COM servers would make everything much simpler.
forderud80 Thank you for your question. We do have a public API that might help (ICatInformation::EnumClassesOfCategories (comcat.h) - Win32 apps | Microsoft Docs) for enumerating CLSIDs of:
- classes that implement a specified category, or
- all classes (by asking for -1 categories)
The results include both classes in HKCR\CLSID and Packaged COM, but there is no public API for querying Packaged COM specifically.
- Aditi_Narvekar
Microsoft
forderud80 Thank you for your question. We do have a public API that might help (ICatInformation::EnumClassesOfCategories (comcat.h) - Win32 apps | Microsoft Docs) for enumerating CLSIDs of:
- classes that implement a specified category, or
- all classes (by asking for -1 categories)
The results include both classes in HKCR\CLSID and Packaged COM, but there is no public API for querying Packaged COM specifically.
- forderud_geCopper Contributor
Thanks a lot Aditi! This was exactly what I'm looking for. 🙂
Do you know if there are also APIs for querying registry metadata for a COM class like Version, InprocServer32/LocalServer32 paths etc. that will include the Packaged COM catalog?- forderud_geCopper ContributorI've now moved the "Version" metadata question to a separate post on https://techcommunity.microsoft.com/t5/msix-deployment/how-to-query-com-class-version-for-packaged-com-extension-points/m-p/3153990