Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All


Specifies the component categories implemented by the target class.

[ implements_category(
) ]


The ID of the implemented category.

Attribute Context

Applies to class, struct
Repeatable Yes
Required attributes One of the following: coclass, progid, or vi_progid
Invalid attributes None

For more information, see Attribute Contexts.


The implements_category C++ attribute specifies the component categories implemented by the target class. This is done by creating a CATEGORY map and adding separate entries specified by the implements_category attribute. For more information, see What are Component Categories and How Do They Work?.

This attribute requires that the coclass, progid, or vi_progid attribute (or another attribute that implies one of these) also be applied to the same element. If any single attribute is used, the other two are automatically applied. For example, if progid is applied, vi_progid and coclass are also applied.


The following code specifies that the following object implements the Control category.

// cpp_attr_ref_implements_category.cpp
// compile with: /LD
#include "atlbase.h"
#include "atlcom.h"

[module (name=MyLib)];
[ coclass, implements_category("CATID_Control"),
class CMyClass

See Also

COM Attributes | Class Attributes | IMPLEMENTED_CATEGORY | Attributes Samples

© 2015 Microsoft