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.

67 lines
1.7 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // ConnPointEnum.h
  7. //
  8. // Description:
  9. // Connection Point Enumerator implementation.
  10. //
  11. // Maintained By:
  12. // Geoffrey Pease (GPease) 04-AUG-2000
  13. //
  14. //////////////////////////////////////////////////////////////////////////////
  15. #pragma once
  16. class CNotificationManager;
  17. // Link list of connection points
  18. typedef struct _SCPEntry {
  19. struct _SCPEntry * pNext; // Next item in list
  20. CLSID iid; // Interface ID
  21. IUnknown * punk; // Punk to object
  22. } SCPEntry;
  23. // ConnPointEnum
  24. class
  25. CConnPointEnum:
  26. public IEnumConnectionPoints
  27. {
  28. friend class CNotificationManager;
  29. private:
  30. // IUnknown
  31. LONG m_cRef;
  32. // IEnumConnectionPoints
  33. SCPEntry * m_pCPList; // List of connection points
  34. SCPEntry * m_pIter; // Iter - don't free
  35. private: // Methods
  36. CConnPointEnum( );
  37. ~CConnPointEnum();
  38. STDMETHOD(Init)( );
  39. HRESULT
  40. HrCopy( CConnPointEnum * pECPIn );
  41. HRESULT
  42. HrAddConnection( REFIID riidIn, IUnknown * punkIn );
  43. public: // Methods
  44. static HRESULT
  45. S_HrCreateInstance( IUnknown ** ppunkOut );
  46. // IUnknown
  47. STDMETHOD(QueryInterface)( REFIID riid, LPVOID *ppv );
  48. STDMETHOD_(ULONG, AddRef)(void);
  49. STDMETHOD_(ULONG, Release)(void);
  50. // IEnumConnectionPoints
  51. STDMETHOD( Next )( ULONG cConnections, LPCONNECTIONPOINT *ppCP, ULONG *pcFetched );
  52. STDMETHOD( Skip )( ULONG cConnections );
  53. STDMETHOD( Reset )( void );
  54. STDMETHOD( Clone )( IEnumConnectionPoints **ppEnum );
  55. }; // class CConnPointEnum