大网数据广告活动
Windows 系统接口

Categorizing by Component Capabilities

· 52CE 我爱测

Component categories can be used to display a subset of all of the installed components.

Component categories can be used to display a subset of all of the installed components. Each component category is identified by a GUID, referred to as a Category ID (CATID). Each CATID has a list of locale-tagged, human-readable names associated with it. A listing of the CATIDs and the human-readable names is stored in a well-known location in the registry.

For example, all components that implement the functionality for OLE document embedding can be classified within a component category. In the past, these objects would have been identified by the "Insertable" key in the registry. To use component categories instead, the following information would be added to the registry:

HKEY_CLASSES_ROOT\Component Categories\{40FC6ED3-2438-11cf-A3DB-080036F12502}
   (Default) = ""
   409 = "Embeddable Objects"

Each class that implements the functionality corresponding to a component category lists the category ID for that category within the CLSID key in the registry. Because a single component can support a wide range of functionality, components can belong to multiple component categories. For example, a particular OLE control might support all of the functionality required to participate as OLE document embedding, Microsoft Visual Basic data binding, and Internet functionality. Such a control would have the following information stored in its CLSID key in the registry:

;The CLSID for "My Super OLE Control" is {12345678-ABCD-4321-0101-00000000000C}HKEY_CLASSES_ROOT\CLSID\{12345678-ABCD-4321-0101-00000000000C}\Implemented Categories
;The CATID for "Insertable" is {40FC6ED3-2438-11cf-A3DB-080036F12502} HKEY_CLASSES_ROOT\CLSID\{12345678-ABCD-4321-0101-00000000000C}Implemented Categories\{40FC6ED3-2438-11cf-A3DB-080036F12502}
;The CATID for "Control" is {40FC6ED4-2438-11cf-A3DB-080036F12502} HKEY_CLASSES_ROOT\CLSID\{12345678-ABCD-4321-0101-00000000000C}Implemented Categories\{40FC6ED4-2438-11cf-A3DB-080036F12502}
;The CATID for an internet aware control is {...CATID_InternetAware...} HKEY_CLASSES_ROOT\CLSID\{12345678-ABCD-4321-0101-00000000000C}Implemented Categories\{...CATID_InternetAware...}
 

With this information, a container can enumerate the controls installed on a system and display only those controls that support the functionality required by the container. The use of component categories provides a way to categorize components by the implemented functionality of the component.

Related topics

Associating Icons with a Category

Categorizing by Container Capabilities

Default Classes and Associations

Defining Component Categories

The Component Categories Manager

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。