CComObjectGlobal Class

此选件类管理在包含您的 Base 对象的模块的引用数。

template< 
   class Base  
> 
class CComObjectGlobal : 
   public Base

参数

成员

公共构造函数

名称

说明

CComObjectGlobal::CComObjectGlobal

构造函数。

CComObjectGlobal::~CComObjectGlobal

该析构函数。

公共方法

名称

说明

CComObjectGlobal::AddRef

实现全局 AddRef

CComObjectGlobal::QueryInterface

实现全局 QueryInterface

CComObjectGlobal::Release

实现全局 Release

公共数据成员

名称

说明

CComObjectGlobal::m_hResFinalConstruct

包含在 CComObjectGlobal 构造对象时返回的 HRESULT

备注

CComObjectGlobal 管理在包含您的 Base 对象的模块的引用数。 CComObjectGlobal 确保您的对象不会删除,只要不释放模块。 您的对象,并在整个模块的引用数为零,只会移除。

例如,使用 CComObjectGlobal,选件类工厂可以容纳由其所有客户端共享的通用全局对象。

继承层次结构

Base

CComObjectGlobal

要求

Header: atlcom.h

请参见

参考

CComObjectStack Class

CComAggObject Class

CComObject Class

其他资源

ATL Class Overview