DECLARE_AGGREGATABLE

指定您的物件可彙總。

DECLARE_AGGREGATABLE( 
   x  
)

參數

  • x
    [in] 要定義為 aggregatable 類別的名稱。

備註

CComCoClass 包含這個巨集指定預設的彙總模型。若要覆寫這項預設,請指定 DECLARE_NOT_AGGREGATABLEDECLARE_ONLY_AGGREGATABLE 巨集在類別定義中。

範例

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

   DECLARE_NOT_AGGREGATABLE(CNoAggClass)
};

需求

Header: atlcom.h

請參閱

其他資源

彙總和 Class Factory 巨集

ATL 巨集