Lines Matching refs:_p
15 T* _p; variable
18 CMyComPtr() { _p = NULL;} in CMyComPtr()
19 CMyComPtr(T* p) {if ((_p = p) != NULL) p->AddRef(); } in CMyComPtr()
22 if ((_p = lp._p) != NULL) in CMyComPtr()
23 _p->AddRef(); in CMyComPtr()
25 ~CMyComPtr() { if (_p) _p->Release(); } in ~CMyComPtr()
26 void Release() { if (_p) { _p->Release(); _p = NULL; } } in Release()
27 operator T*() const { return (T*)_p; }
29 T** operator&() { return &_p; }
30 T* operator->() const { return _p; }
35 if (_p)
36 _p->Release();
37 _p = p;
40 T* operator=(const CMyComPtr<T>& lp) { return (*this = lp._p); }
41 bool operator!() const { return (_p == NULL); }
47 _p = p2; in Attach()
51 T* pt = _p; in Detach()
52 _p = NULL; in Detach()
58 return ::CoCreateInstance(rclsid, pUnkOuter, dwClsContext, iid, (void**)&_p);
75 return _p->QueryInterface(iid, (void**)pp); in QueryInterface()