Export (0) Print
Expand All

CComPtrBase Class

This class provides a basis for smart pointer classes using COM-based memory routines.

template < 
   class T  
> class CComPtrBase

T

The object type to be referenced by the smart pointer.

Name

Description

CComPtrBase::~CComPtrBase

The destructor.

Name

Description

CComPtrBase::Advise

Call this method to create a connection between the CComPtrBase's connection point and a client's sink.

CComPtrBase::Attach

Call this method to take ownership of an existing pointer.

CComPtrBase::CoCreateInstance

Call this method to create an object of the class associated with a specified Class ID or Program ID.

CComPtrBase::CopyTo

Call this method to copy the CComPtrBase pointer to another pointer variable.

CComPtrBase::Detach

Call this method to release ownership of a pointer.

CComPtrBase::IsEqualObject

Call this method to check if the specified IUnknown points to the same object associated with the CComPtrBase object.

CComPtrBase::QueryInterface

Call this method to return a pointer to a specified interface.

CComPtrBase::Release

Call this method to release the interface.

CComPtrBase::SetSite

Call this method to set the site of the CComPtrBase object to the IUnknown of the parent object.

Name

Description

CComPtrBase::operator T*

The cast operator.

CComPtrBase::operator !

The NOT operator.

CComPtrBase::operator &

The & operator.

CComPtrBase::operator *

The * operator.

CComPtrBase::operator <

The less-than operator.

CComPtrBase::operator ==

The equality operator.

CComPtrBase::operator ->

The pointer-to-members operator.

Name

Description

CComPtrBase::p

The pointer data member variable.

This class provides the basis for other smart pointers which use COM memory management routines, such as CComQIPtr and CComPtr. The derived classes add their own constructors and operators, but rely on the methods provided by CComPtrBase.

Header: atlcomcli.h

Show:
© 2014 Microsoft