Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

CComObjectGlobal Class

This class manages a reference count on the module containing your Base object.

template< 
   class Base  
> 
class CComObjectGlobal : 
   public Base
Base

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

Name

Description

CComObjectGlobal::AddRef

Implements a global AddRef.

CComObjectGlobal::QueryInterface

Implements a global QueryInterface.

CComObjectGlobal::Release

Implements a global Release.

Name

Description

CComObjectGlobal::m_hResFinalConstruct

Contains the HRESULT returned during construction of the CComObjectGlobal object.

CComObjectGlobal manages a reference count on the module containing your Base object. CComObjectGlobal ensures your object will not be deleted as long as the module is not released. Your object will only be removed when the reference count on the entire module goes to zero.

For example, using CComObjectGlobal, a class factory can hold a common global object that is shared by all its clients.

Base

CComObjectGlobal

Header: atlcom.h

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.