CComPtrBase Class
This class provides a basis for smart pointer classes using COM-based memory routines.
template <
class T
> class CComPtrBase
Parameters
- T
The object type to be referenced by the smart pointer.
Members
Public Constructors
Name |
Description |
---|---|
The destructor. |
Public Methods
Name |
Description |
---|---|
Call this method to create a connection between the CComPtrBase's connection point and a client's sink. |
|
Call this method to take ownership of an existing pointer. |
|
Call this method to create an object of the class associated with a specified Class ID or Program ID. |
|
Call this method to copy the CComPtrBase pointer to another pointer variable. |
|
Call this method to release ownership of a pointer. |
|
Call this method to check if the specified IUnknown points to the same object associated with the CComPtrBase object. |
|
Call this method to return a pointer to a specified interface. |
|
Call this method to release the interface. |
|
Call this method to set the site of the CComPtrBase object to the IUnknown of the parent object. |
Public Operators
Name |
Description |
---|---|
The cast operator. |
|
The NOT operator. |
|
The & operator. |
|
The * operator. |
|
The less-than operator. |
|
The equality operator. |
|
The pointer-to-members operator. |
Public Data Members
Name |
Description |
---|---|
The pointer data member variable. |
Remarks
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.
Requirements
Header: atlcomcli.h