Export (0) Print
Expand All

CComContainedObject Class

This class implements IUnknown by delegating to the owner object's IUnknown.

Important note Important

This class and its members cannot be used in applications that execute in the Windows Runtime.

template< 
class Base  
> 
class CComContainedObject : 
public Base

Base

Your class, derived from CComObjectRoot or CComObjectRootEx.

Name

Description

CComContainedObject::CComContainedObject

The constructor. Initializes the member pointer to the owner object's IUnknown.

CComContainedObject::~CComContainedObject

The destructor.

Name

Description

CComContainedObject::AddRef

Increments the reference count on the owner object.

CComContainedObject::GetControllingUnknown

Retrieves the owner object's IUnknown.

CComContainedObject::QueryInterface

Retrieves a pointer to the interface requested on the owner object.

CComContainedObject::Release

Decrements the reference count on the owner object.

ATL uses CComContainedObject in classes CComAggObject, CComPolyObject, and CComCachedTearOffObject. CComContainedObject implements IUnknown by delegating to the owner object's IUnknown. (The owner is either the outer object of an aggregation, or the object for which a tear-off interface is being created.) CComContainedObject calls CComObjectRootEx's OuterQueryInterface, OuterAddRef, and OuterRelease, all inherited through Base.

Base

CComContainedObject

Header: atlcom.h

Show:
© 2014 Microsoft