template< class T, const IID* piid >
class CComQIPtr
Parameters
T
A COM interface specifying the type of pointer to be stored.
piid
A pointer to the IID of T.
ATL uses CComQIPtr and CComPtr to manage COM interface pointers. Both classes perform automatic reference counting through calls to AddRef and Release. Overloaded operators handle pointer operations. CComQIPtr additionally supports automatic querying of interfaces though QueryInterface.
For an example of using CComQIPtr and CComPtr, see the CComPtr class overview.
Note Do not use CComQIPtr<IUnknown, &IID_IUnknown>. Rather, use CComPtr<IUnknown>.
#include <atlbase.h>
See Also CComPtr::CComPtr, CComQIPtr::CComQIPtr