如何使用已定义的组件类别创建并排组件 [英] How to create Side-by-Side assembly with defined Component Categories
问题描述
我目前正致力于通过Win SxS(此处及以下的并排组件)机制使一个应用程序无法注册。换句话说,我想让这个应用程序成为一个独立的应用程序。
这个应用程序使用一些第三方COM组件用于GUI元素。其中一些组件使用组件类别管理器,同时实例化其他COM组件(可能通过ICatInformation)。我能够将这些组件的几乎所有COM注册
数据转换为Win SxS清单,但我不明白如何转换有关"已实施类别"的信息。这些是注册表项,例如HKEY_CLASSES_ROOT \CLSID \ {...} \实现类别和HKEY_CLASSES_ROOT \Component Categories \ {...}。
问题是:如何在Win SxS清单中保存有关COM组件的组件类别信息?现在甚至可以吗?在"隔离应用程序和并排装配"下的官方文档中找不到答案。
更多细节:
我确信这些COM组件使用组件类别管理器,因为当"已实现的类别"时,应用程序无法正常工作。注册表中缺少数据。当我将这些数据添加到注册表时,它运行正常。此外,如果我使用
Win SxS清单来运行此应用程序无需注册,只添加"HKEY_CLASSES_ROOT \ Component Category; \\ {...}","HKEY_CLASSES_ROOT \ CLSID \ {{ ...} \实现类别\ {...}"到注册表,应用程序运行正常!
I am currently working towards making one application to be reg-free through Win SxS (Side-by-Side Assemblies here and below) mechanisms. In other words I wand to make this app to be an Isolated Application.
This application is using some third-party COM components for GUI elements. Some of these components use Component Categories Manager while instantiating other COM components (probably through ICatInformation). I was able to convert almost all COM registration
data of these components into Win SxS manifests, but I don't understand how to convert info about "Implemented Categories". These are registry entries like HKEY_CLASSES_ROOT\CLSID\{...}\Implemented Categories and HKEY_CLASSES_ROOT\Component Categories\{...}.
The question is: How do I save Component Categories information about COM component in Win SxS manifest ? Is it even possible now? Failed to find the answer in official documentation under 'Isolated Applications and Side-by-Side Assemblies'.
More details:
I am sure that these COM components use Component Categories Manager, because the application doesn't work properly when "Implemented Categories" data is missing from registry. When I add these data to the registry it runs fine. Moreover, if I use
Win SxS manifests to run this application reg-free and only add keys like "HKEY_CLASSES_ROOT\Component Categories\{...}", "HKEY_CLASSES_ROOT\CLSID\{...}\Implemented Categories\{...}" to the registry, the application also runs fine!
推荐答案
您好,
感谢您在此发帖。
>>"如何在Win SxS清单中保存有关COM组件的组件类别信息?现在是否可能 "
>>" How do I save Component Categories information about COM component in Win SxS manifest ? Is it even possible now "
您可以考虑您的组件是否适合并排组装。
You consider whether your component makes a suitable candidate for a side-by-side assembly.
并非每个组件都适合并排组装。如果满足以下任何条件,则组件不适合并排组装:
Not every component is a suitable candidate for a side-by-side assembly. A component is not a suitable candidate for a side-by-side assembly if any of the following are true:
- 组件处理应用程序之间的通信。例如,OLE32的某些部分不能做出良好的并排组装,因为您不希望在系统上运行
的应用程序之间协调通信的两个不同版本的部件。 - 该组件管理系统的物理或虚拟设备。例如,打印假脱机程序的设备驱动程序。
因此,当您使用已定义的组件创建并排程序集时,需要检查上述条件。
So when you create side-by-side assembly with defined component, you need to check above conditions.
有关详细信息,请参阅
document
For more information, please see the document
最好的问候,
Hart
这篇关于如何使用已定义的组件类别创建并排组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!