Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Collapse the table of content
Expand the table of content


Allows you to specify a text description for your class object.



[in] The class object's description.

ATL enters this description into the object map through the OBJECT_ENTRY macro.

DECLARE_OBJECT_DESCRIPTION implements a GetObjectDescription function, which you can use to override the CComCoClass::GetObjectDescription method.

The GetObjectDescription function is called by IComponentRegistrar::GetComponents. IComponentRegistrar is an Automation interface that allows you to register and unregister individual components in a DLL. When you create a Component Registrar object with the ATL Project Wizard, the wizard will automatically implement the IComponentRegistrar interface. IComponentRegistrar is typically used by Microsoft Transaction Server.

For more information about the ATL Project Wizard, see the article Creating an ATL Project.

class ATL_NO_VTABLE CMyDescribedClass :
   public CComObjectRoot,
   public CComCoClass<CMyDescribedClass, &CLSID_MyDescribedClass>

   // Override CComCoClass::GetObjectDescription
   DECLARE_OBJECT_DESCRIPTION("My Described Object 1.0")

Header: atlcom.h

© 2015 Microsoft