Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
2.4 KiB

  1. /*++
  2. Copyright (c) 1997-1999 Microsoft Corporation
  3. Module Name:
  4. connect.h
  5. Abstract:
  6. Declaration of the CTAPIConnectionPoint class
  7. Author:
  8. mquinton 06-12-97
  9. Notes:
  10. Revision History:
  11. --*/
  12. #ifndef __CONNECT_H_
  13. #define __CONNECT_H_
  14. class CTAPIConnectionPoint :
  15. public CTAPIComObjectRoot<CTAPIConnectionPoint>,
  16. public IConnectionPoint
  17. {
  18. public:
  19. CTAPIConnectionPoint() : m_iid(CLSID_NULL),
  20. m_pCPC(NULL),
  21. m_pConnectData(NULL),
  22. m_bInitialized(FALSE),
  23. m_hUnadviseEvent(NULL),
  24. m_fMarkedForDelete(FALSE)
  25. {}
  26. BEGIN_COM_MAP(CTAPIConnectionPoint)
  27. COM_INTERFACE_ENTRY(IConnectionPoint)
  28. COM_INTERFACE_ENTRY_FUNC(IID_IMarshal, 0, IMarshalQI)
  29. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pFTM)
  30. END_COM_MAP()
  31. DECLARE_MARSHALQI(CTAPIConnectionPoint)
  32. DECLARE_QI()
  33. DECLARE_TRACELOG_CLASS(CTAPIConnectionPoint)
  34. protected:
  35. IConnectionPointContainer * m_pCPC;
  36. CONNECTDATA * m_pConnectData;
  37. IID m_iid;
  38. BOOL m_bInitialized;
  39. HANDLE m_hUnadviseEvent;
  40. //
  41. // the following member variables are synchronized with
  42. // the gcsGlobalInterfaceTable critical section
  43. //
  44. DWORD m_dwCallbackCookie;
  45. DWORD m_cThreadsInGet;
  46. BOOL m_fMarkedForDelete;
  47. public:
  48. HRESULT Initialize(
  49. IConnectionPointContainer * pCPC,
  50. IID iid
  51. );
  52. ULONG_PTR GrabEventCallback();
  53. HRESULT STDMETHODCALLTYPE GetConnectionInterface(
  54. IID * pIID
  55. );
  56. HRESULT STDMETHODCALLTYPE GetConnectionPointContainer(
  57. IConnectionPointContainer ** ppCPC
  58. );
  59. HRESULT STDMETHODCALLTYPE Advise(
  60. IUnknown * pUnk,
  61. DWORD * pdwCookie
  62. );
  63. HRESULT STDMETHODCALLTYPE Unadvise(
  64. DWORD dwCookie
  65. );
  66. HRESULT STDMETHODCALLTYPE EnumConnections(
  67. IEnumConnections ** ppEnum
  68. );
  69. void FinalRelease();
  70. };
  71. #endif