Export (0) Print
Expand All
Expand Minimize

DECLARE_AGGREGATABLE

Specifies that your object can be aggregated.

DECLARE_AGGREGATABLE( 
   x  
)

x

[in] The name of the class you are defining as aggregatable.

CComCoClass contains this macro to specify the default aggregation model. To override this default, specify either the DECLARE_NOT_AGGREGATABLE or DECLARE_ONLY_AGGREGATABLE macro in your class definition.

class ATL_NO_VTABLE CNoAggClass :
   public CComObjectRoot,
   public CComCoClass<CNoAggClass, &CLSID_NoAggClass>
{
public:
   CNoAggClass()
   {
   }

   DECLARE_NOT_AGGREGATABLE(CNoAggClass)
};

Header: atlcom.h

Show:
© 2014 Microsoft