Classifying Components

Classifying 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



Community Additions

© 2015 Microsoft