Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cComConnectionPoint.h
Go to the documentation of this file.
1 //
4 //
5 
6 #ifndef _INC_cComConnectionPoint_H
7 #define _INC_cComConnectionPoint_H
8 #ifndef NO_PRAGMA_ONCE
9 #pragma once
10 #endif
11 
12 #include "cComDispatch.h"
14 
15 #ifdef _WIN32
16 struct IConnectionPoint;
17 
18 namespace GrayLib
19 {
20  class cComConnectionPoint : public cRefBase, public cComDispatch
21  {
26 
27  private:
28  cIUnkPtr<IUnknown> m_pControl;
29  cIUnkPtr<IConnectionPoint> m_pConnectionPoint;
30  DWORD m_dwAdviseCookie;
31 
32  public:
33  cComConnectionPoint(IDispatch* pThisDispatch, const GUID& rguidTypeLib, const GUID& rguidTypeInfo);
34  virtual ~cComConnectionPoint();
35 
36  virtual bool isDisposed() const
37  {
38  return m_pControl == nullptr;
39  }
40  HRESULT AttachConnectionPoint(IUnknown* pControl);
41  virtual HRESULT DisposeThis();
42 
43  STDMETHOD(QueryInterface)(const IID& riid, LPVOID* ppv) override;
44  };
45 };
46 #endif
47 #endif
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
Definition: IUnknown.h:68
Definition: cMesh.h:22
template class __DECL_IMPORT cIUnkPtr< IUnknown >
Definition: cIUnkPtr.h:315
Definition: IUnknown.h:34