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.

64 lines
1.8 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // ConnPointEnum.h
  7. //
  8. // Description:
  9. // 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 CNotificationManager;
  18. // Link list of connection points
  19. typedef struct _SCPEntry
  20. {
  21. struct _SCPEntry * pNext; // Next item in list
  22. CLSID iid; // Interface ID
  23. IUnknown * punk; // Punk to object
  24. } SCPEntry;
  25. // ConnPointEnum
  26. class CConnPointEnum
  27. : public IEnumConnectionPoints
  28. {
  29. friend class CNotificationManager;
  30. private:
  31. // IUnknown
  32. LONG m_cRef;
  33. // IEnumConnectionPoints
  34. SCPEntry * m_pCPList; // List of connection points
  35. SCPEntry * m_pIter; // Iter - don't free
  36. private: // Methods
  37. CConnPointEnum( void );
  38. ~CConnPointEnum( void );
  39. STDMETHOD( HrInit )( void );
  40. HRESULT HrCopy( CConnPointEnum * pECPIn );
  41. HRESULT HrAddConnection( REFIID riidIn, IUnknown * punkIn );
  42. public: // Methods
  43. static HRESULT S_HrCreateInstance( IUnknown ** ppunkOut );
  44. // IUnknown
  45. STDMETHOD( QueryInterface )( REFIID riidIn, LPVOID * ppvOut );
  46. STDMETHOD_( ULONG, AddRef )( void );
  47. STDMETHOD_( ULONG, Release )( void );
  48. // IEnumConnectionPoints
  49. STDMETHOD( Next )( ULONG cConnections, LPCONNECTIONPOINT * ppCP, ULONG * pcFetched );
  50. STDMETHOD( Skip )( ULONG cConnections );
  51. STDMETHOD( Reset )( void );
  52. STDMETHOD( Clone )( IEnumConnectionPoints ** ppEnum );
  53. }; //*** class CConnPointEnum