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.

97 lines
2.9 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // EnumCPINotifyUI.h
  7. //
  8. // Description:
  9. // INotifyUI Connection Point Enumerator implementation.
  10. //
  11. // Maintained By:
  12. // David Potter (DavidP) 19-JUN-2001
  13. // Geoffrey Pease (GPease) 04-AUG-2000
  14. //
  15. //////////////////////////////////////////////////////////////////////////////
  16. #pragma once
  17. class CCPINotifyUI;
  18. //////////////////////////////////////////////////////////////////////////////
  19. // Include Files
  20. //////////////////////////////////////////////////////////////////////////////
  21. //////////////////////////////////////////////////////////////////////////////
  22. // Constant Declarations
  23. //////////////////////////////////////////////////////////////////////////////
  24. //////////////////////////////////////////////////////////////////////////////
  25. //++
  26. //
  27. // class CEnumCPINotifyUI
  28. //
  29. // Description:
  30. // The class CEnumCPINotifyUI is an enumerator of connection points
  31. // that are "advised" for notify UI callbacks.
  32. //
  33. // Interfaces:
  34. // IEnumConnections
  35. //
  36. //--
  37. //////////////////////////////////////////////////////////////////////////////
  38. class CEnumCPINotifyUI
  39. : public IEnumConnections
  40. {
  41. friend class CCPINotifyUI;
  42. private:
  43. // IUnknown
  44. LONG m_cRef; // Reference counter
  45. // IEnumConnections
  46. ULONG m_cAlloced; // Alloced number of entries
  47. ULONG m_cCurrent; // Number of entries currently used
  48. ULONG m_cIter; // The Iter
  49. IUnknown ** m_pList; // List of sinks (IUnknown)
  50. BOOL m_fIsClone; // Is this instance a clone?
  51. // INotifyUI
  52. private: // Methods
  53. CEnumCPINotifyUI( void );
  54. ~CEnumCPINotifyUI( void );
  55. // Private copy constructor to prevent copying.
  56. CEnumCPINotifyUI( const CEnumCPINotifyUI & nodeSrc );
  57. // Private assignment operator to prevent copying.
  58. const CEnumCPINotifyUI & operator = ( const CEnumCPINotifyUI & nodeSrc );
  59. HRESULT HrInit( BOOL fIsCloneIn = FALSE );
  60. HRESULT HrCopy( CEnumCPINotifyUI * pecpIn );
  61. HRESULT HrAddConnection( IUnknown * punkIn, DWORD * pdwCookieOut );
  62. HRESULT HrRemoveConnection( DWORD dwCookieIn );
  63. public:
  64. static HRESULT S_HrCreateInstance( IUnknown ** ppunkOut );
  65. //
  66. // IUnknown
  67. //
  68. STDMETHOD( QueryInterface )( REFIID riidIn, LPVOID * ppvOut );
  69. STDMETHOD_( ULONG, AddRef )( void );
  70. STDMETHOD_( ULONG, Release )( void );
  71. //
  72. // IEnumConnections
  73. //
  74. STDMETHOD( Next )( ULONG cConnectionsIn, LPCONNECTDATA rgcdOut, ULONG * pcFetchedOut );
  75. STDMETHOD( Skip )( ULONG cConnectionsIn );
  76. STDMETHOD( Reset )( void );
  77. STDMETHOD( Clone )( IEnumConnections ** ppEnumOut );
  78. }; //*** class CEnumCPINotifyUI