Partager via


CComContainedObject Class

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

Important

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

template< 
class Base  
> 
class CComContainedObject : 
public Base

Parameters

Members

Public Constructors

Name

Description

CComContainedObject::CComContainedObject

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

CComContainedObject::~CComContainedObject

The destructor.

Public Methods

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.

Remarks

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.

Inheritance Hierarchy

Base

CComContainedObject

Requirements

Header: atlcom.h

See Also

Other Resources

ATL Class Overview