ReactOS 0.4.15-dev-7942-gd23573b
ATL::CComQIIDPtr< T, piid > Class Template Reference

#include <atlcomcli.h>

Inheritance diagram for ATL::CComQIIDPtr< T, piid >:
Collaboration diagram for ATL::CComQIIDPtr< T, piid >:

Public Member Functions

 CComQIIDPtr ()
 
 CComQIIDPtr (_Inout_opt_ T *lp)
 
 CComQIIDPtr (_Inout_ const CComQIIDPtr< T, piid > &lp)
 
 CComQIIDPtr (_Inout_opt_ IUnknown *lp)
 
Toperator= (T *lp)
 
Toperator= (const CComQIIDPtr< T, piid > &lp)
 
Toperator= (IUnknown *lp)
 
- Public Member Functions inherited from ATL::CComPtr< T >
 CComPtr ()
 
 CComPtr (T *lp)
 
 CComPtr (const CComPtr< T > &lp)
 
 ~CComPtr ()
 
HRESULT CoCreateInstance (REFCLSID rclsid, REFIID riid, LPUNKNOWN pOuter=NULL, DWORD ClsCtx=CLSCTX_ALL)
 
HRESULT CoCreateInstance (LPCOLESTR ProgID, REFIID riid, LPUNKNOWN pOuter=NULL, DWORD ClsCtx=CLSCTX_ALL)
 
Toperator= (T *lp)
 
Toperator= (const CComPtr< T > &lp)
 
void Release ()
 
void Attach (T *lp)
 
TDetach ()
 
T ** operator& ()
 
 operator T* ()
 
_NoAddRefReleaseOnCComPtr< T > * operator-> () const
 

Additional Inherited Members

- Public Attributes inherited from ATL::CComPtr< T >
Tp
 

Detailed Description

template<class T, const IID * piid>
class ATL::CComQIIDPtr< T, piid >

Definition at line 218 of file atlcomcli.h.

Constructor & Destructor Documentation

◆ CComQIIDPtr() [1/4]

template<class T , const IID * piid>
ATL::CComQIIDPtr< T, piid >::CComQIIDPtr ( )
inline

Definition at line 225 of file atlcomcli.h.

226 {
227 }

◆ CComQIIDPtr() [2/4]

template<class T , const IID * piid>
ATL::CComQIIDPtr< T, piid >::CComQIIDPtr ( _Inout_opt_ T lp)
inline

Definition at line 228 of file atlcomcli.h.

228 :
229 CComPtr<T>(lp)
230 {
231 }

◆ CComQIIDPtr() [3/4]

template<class T , const IID * piid>
ATL::CComQIIDPtr< T, piid >::CComQIIDPtr ( _Inout_ const CComQIIDPtr< T, piid > &  lp)
inline

Definition at line 232 of file atlcomcli.h.

232 :
233 CComPtr<T>(lp.p)
234 {
235 }

◆ CComQIIDPtr() [4/4]

template<class T , const IID * piid>
ATL::CComQIIDPtr< T, piid >::CComQIIDPtr ( _Inout_opt_ IUnknown lp)
inline

Definition at line 236 of file atlcomcli.h.

237 {
238 if (lp != NULL)
239 {
240 if (FAILED(lp->QueryInterface(*piid, (void**)(IUnknown**)&p)))
241 p = NULL;
242 }
243 }
#define NULL
Definition: types.h:112
GLfloat GLfloat p
Definition: glext.h:8902
#define FAILED(hr)
Definition: intsafe.h:51

Member Function Documentation

◆ operator=() [1/3]

template<class T , const IID * piid>
T * ATL::CComQIIDPtr< T, piid >::operator= ( const CComQIIDPtr< T, piid > &  lp)
inline

Definition at line 258 of file atlcomcli.h.

259 {
260 T* pOld = p;
261
262 p = lp.p;
263 if (p != NULL)
264 p->AddRef();
265
266 if (pOld != NULL)
267 pOld->Release();
268
269 return *this;
270 }
#define T
Definition: mbstring.h:31

◆ operator=() [2/3]

template<class T , const IID * piid>
T * ATL::CComQIIDPtr< T, piid >::operator= ( IUnknown lp)
inline

Definition at line 272 of file atlcomcli.h.

273 {
274 T* pOld = p;
275
276 if (!lp || FAILED(lp->QueryInterface(*piid, (void**)(IUnknown**)&p)))
277 p = NULL;
278
279 if (pOld != NULL)
280 pOld->Release();
281
282 return *this;
283 }
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)

◆ operator=() [3/3]

template<class T , const IID * piid>
T * ATL::CComQIIDPtr< T, piid >::operator= ( T lp)
inline

Definition at line 244 of file atlcomcli.h.

245 {
246 T* pOld = p;
247
248 p = lp;
249 if (p != NULL)
250 p->AddRef();
251
252 if (pOld != NULL)
253 pOld->Release();
254
255 return *this;
256 }

The documentation for this class was generated from the following file: