Leaked source code of windows server 2003
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.

57 lines
2.1 KiB

  1. //---------------------------------------------------------------------------
  2. // NotifyConnPt.h : CVDNotifyDBEventsConnPt header file
  3. //
  4. // Copyright (c) 1996 Microsoft Corporation, All Rights Reserved
  5. // Developed by Sheridan Software Systems, Inc.
  6. //---------------------------------------------------------------------------
  7. #ifndef __CVDNOTIFYDBEVENTSCONNPT__
  8. #define __CVDNOTIFYDBEVENTSCONNPT__
  9. class CVDNotifyDBEventsConnPt : public IConnectionPoint
  10. {
  11. protected:
  12. // Construction/Destruction
  13. CVDNotifyDBEventsConnPt();
  14. ~CVDNotifyDBEventsConnPt();
  15. public:
  16. static HRESULT Create(IConnectionPointContainer * pConnPtContainer, CVDNotifyDBEventsConnPt ** ppNotifyDBEventsConnPt);
  17. public:
  18. // Access functions
  19. UINT GetConnectionsActive() const {return m_uiConnectionsActive;}
  20. INotifyDBEvents ** GetNotifyDBEventsTable() const {return m_ppNotifyDBEvents;}
  21. protected:
  22. // Data members
  23. DWORD m_dwRefCount;
  24. UINT m_uiConnectionsAllocated;
  25. UINT m_uiConnectionsActive;
  26. INotifyDBEvents ** m_ppNotifyDBEvents; // pointer to an array of INotifyDBEvents ptrs
  27. IConnectionPointContainer * m_pConnPtContainer;
  28. public:
  29. // IUnknown methods -- there are required since we inherit from variuos
  30. // people who themselves inherit from IUnknown.
  31. //
  32. //=--------------------------------------------------------------------------=
  33. // IUnknown methods
  34. //
  35. STDMETHOD(QueryInterface)(REFIID riid, void **ppvObjOut);
  36. STDMETHOD_(ULONG, AddRef)(void);
  37. STDMETHOD_(ULONG, Release)(void);
  38. //=--------------------------------------------------------------------------=
  39. // IConnectionPoint methods
  40. //
  41. STDMETHOD(GetConnectionInterface)(THIS_ IID FAR* pIID);
  42. STDMETHOD(GetConnectionPointContainer)(THIS_
  43. IConnectionPointContainer FAR* FAR* ppCPC);
  44. STDMETHOD(Advise)(THIS_ LPUNKNOWN pUnkSink, DWORD FAR* pdwCookie);
  45. STDMETHOD(Unadvise)(THIS_ DWORD dwCookie);
  46. STDMETHOD(EnumConnections)(THIS_ LPENUMCONNECTIONS FAR* ppEnum);
  47. };
  48. /////////////////////////////////////////////////////////////////////////////
  49. #endif //__CVDNOTIFYDBEVENTSCONNPT__