Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

CComObjectGlobal Class 

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


template<
   class Base 
>
class CComObjectGlobal :
      public Base

Parameters

Base

Your class, derived from CComObjectRoot or CComObjectRootEx, as well as from any other interface you want to support on the 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.

Header: atlcom.h

Community Additions

ADD
Show:
© 2015 Microsoft