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.
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.
A smart pointer class for managing COM interface pointers.
template<
class T,
const IID* piid = &__uuidof(T)
>
class CComQIPtr: public CComPtr<T>
Parameters
T
A COM interface specifying the type of pointer to be stored.
piid
A pointer to the IID of T.
Remarks
ATL uses CComQIPtr and CComPtr to manage COM interface pointers, both of which derive from CComPtrBase. Both classes perform automatic reference counting through calls to AddRef and Release. Overloaded operators handle pointer operations.
For an example of using CComQIPtr and CComPtr, see the CComPtr class overview.
A smart pointer class for managing COM interface pointers.
template<
class T
>
class CComPtr
Parameters
T
A COM interface specifying the type of pointer to be stored.
Remarks
ATL uses CComPtr and CComQIPtr to manage COM interface pointers. Both are derived from CComPtrBase, and both perform automatic reference counting.