Partager via


CComObject Class

This class implements IUnknown for a nonaggregated object.

template< 
   class Base  
> 
class CComObject : 
   public Base

Parameters

Members

Public Constructors

Name

Description

CComObject::CComObject

The constructor.

CComObject::~CComObject

The destructor.

Public Methods

Name

Description

CComObject::AddRef

Increments the reference count on the object.

CComObject::CreateInstance

(Static) Creates a new CComObject object.

CComObject::QueryInterface

Retrieves a pointer to the requested interface.

CComObject::Release

Decrements the reference count on the object.

Remarks

CComObject implements IUnknown for a nonaggregated object. However, calls to QueryInterface, AddRef, and Release are delegated to CComObjectRootEx.

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

Inheritance Hierarchy

Base

CComObject

Requirements

Header: atlcom.h

See Also

Reference

CComAggObject Class

CComPolyObject Class

DECLARE_AGGREGATABLE

DECLARE_NOT_AGGREGATABLE

Other Resources

ATL Class Overview