Share via


CComGITPtr Class

This class provides methods for dealing with interface pointers and the global interface table (GIT).

template < 
   class T  
> 
class CComGITPtr

Parameters

  • T
    The type of the interface pointer to be stored in the GIT.

Members

Public Constructors

Name

Description

CComGITPtr::CComGITPtr

The constructor.

CComGITPtr::~CComGITPtr

The destructor.

Public Methods

Name

Description

CComGITPtr::Attach

Call this method to register the interface pointer in the global interface table (GIT).

CComGITPtr::CopyTo

Call this method to copy the interface from the global interface table (GIT) to the passed pointer.

CComGITPtr::Detach

Call this method to disassociate the interface from the CComGITPtr object.

CComGITPtr::GetCookie

Call this method to return the cookie from the CComGITPtr object.

CComGITPtr::Revoke

Call this method to remove the interface from the global interface table (GIT).

Public Operators

Name

Description

CComGITPtr::operator DWORD

Returns the cookie from the CComGITPtr object.

CComGITPtr::operator =

Assignment operator.

Public Data Members

Name

Description

CComGITPtr::m_dwCookie

The cookie.

Remarks

Objects that aggregate the free threaded marshaler and need to use interface pointers obtained from other objects must take extra steps to ensure that the interfaces are correctly marshaled. Typically this involves storing the interface pointers in the GIT and getting the pointer from the GIT each time it is used. The class CComGITPtr is provided to help you use interface pointers stored in the GIT.

Note

The global interface table facility is only available on Windows 95 with DCOM version 1.1 and later, Windows 98, Windows NT 4.0 with Service Pack 3 and later, and Windows 2000.

Requirements

Header: atlbase.h

See Also

Reference

Accessing Interfaces Across Apartments

When to Use the Global Interface Table

Concepts

ATL and the Free Threaded Marshaler

Other Resources

ATL Class Overview