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
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

CComAggObject Class

This class implements the IUnknown interface for an aggregated object. By definition, an aggregated object is contained within an outer object. The CComAggObject class is similar to the CComObject Class, except that it exposes an interface that is directly accessible to external clients.

template< 
   class contained 
> 
class CComAggObject : 
   public IUnknown, public CComObjectRootEx 
   < contained::_ThreadModel::ThreadModelNoCS >

contained

Your class, derived from CComObjectRoot or CComObjectRootEx, as well as from any other interfaces you want to support on the object.

CComAggObject implements IUnknown for an aggregated object. CComAggObject has its own IUnknown interface, separate from the outer object's IUnknown interface, and maintains its own reference count.

For more information about aggregation, see the article Fundamentals of ATL COM Objects.

Header: atlcom.h

Community Additions

ADD
Show:
© 2015 Microsoft