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

Classifying Components

· 52CE 我爱测

While a client is able to browse through the list of CLSIDs in the registry and select a component to use, loading each component in the registry and querying it for its supported interfaces is very time-consuming. To determine whether a component supports the interfaces required before creating an instance of the component, a method to classify components…

While a client is able to browse through the list of CLSIDs in the registry and select a component to use, loading each component in the registry and querying it for its supported interfaces is very time-consuming. To determine whether a component supports the interfaces required before creating an instance of the component, a method to classify components into categories was developed.

A component category is a set of interfaces that have been assigned a GUID named CATID. Components that implement all of the interfaces in a component category register themselves as members of that component category. Components that belong to a certain component category can then be selected from the registry. By registering itself as a member of a component category, the component is guaranteeing that it supports all of the member interfaces in the component category.

A component can be a member of many categories. It is not limited to supporting interfaces in a component category. It can support any interface, in addition to those in a component category.

In contrast to the standard registration of components, in which developers must write code that manually registers objects, component categories automates much of this work. The six methods of the ICatRegister interface define component categories and register objects that implement or require them. The Component Categories Manager object implements this interface. See ICatRegister and ICatInformation for additional information on using component categories.

Related topics

Registering COM Applications

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)

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

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