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.

54 lines
1.1 KiB

  1. //#--------------------------------------------------------------
  2. //
  3. // File: portscoll.h
  4. //
  5. // Synopsis: This file holds the declarations of the
  6. // CPortsCollection class
  7. //
  8. //
  9. // History: 10/23/98 MKarki Created
  10. //
  11. // Copyright (C) 1997-98 Microsoft Corporation
  12. // All rights reserved.
  13. //
  14. //---------------------------------------------------------------
  15. #ifndef _PORTSCOLL_H_
  16. #define _PORTSCOLL_H_
  17. #include <map>
  18. using namespace std;
  19. class CPortsCollection
  20. {
  21. public:
  22. CPortsCollection ():m_bDoneGet(false){};
  23. ~CPortsCollection ();
  24. HRESULT Insert (
  25. /*[in]*/ WORD dwPort,
  26. /*[in]*/ DWORD dwIPAddress
  27. );
  28. HRESULT GetNext (
  29. /*[out]*/ PWORD pdwPort,
  30. /*[out]*/ PDWORD pdwIPAddress
  31. );
  32. private:
  33. typedef multimap <WORD, DWORD> PORTSCOLLECTION;
  34. typedef PORTSCOLLECTION::iterator PORTITR;
  35. PORTSCOLLECTION m_mapPorts;
  36. PORTITR m_itr;
  37. bool m_bDoneGet;
  38. };
  39. #endif // _PORTSCOLL_H_