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.

63 lines
1.2 KiB

  1. //#--------------------------------------------------------------
  2. //
  3. // File: ports.h
  4. //
  5. // Synopsis: This file holds the declarations of the
  6. // CPorts 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 _PORTS_H_
  16. #define _PORTS_H_
  17. #include <vector>
  18. using namespace std;
  19. class CPortsCollection;
  20. //#define DEFAULT_ARRAY_SIZE
  21. class CPorts
  22. {
  23. public:
  24. CPorts (){};
  25. ~CPorts ();
  26. HRESULT Resolve (
  27. /*[in]*/ VARIANT *pvIn
  28. );
  29. HRESULT CollectPortInfo (
  30. /*[in]*/ CPortsCollection& portCollection,
  31. /*[in]*/ PWCHAR pwszPortInfo
  32. );
  33. HRESULT SetPorts (
  34. /*[in]*/ CPortsCollection& portsCollection,
  35. /*[in]*/ const fd_set& SocketSet
  36. );
  37. HRESULT GetSocketSet (
  38. /*[out]*/ fd_set *pSocketSet
  39. );
  40. HRESULT Clear ();
  41. private:
  42. fd_set m_PortSet;
  43. typedef vector <SOCKET> SOCKETARRAY;
  44. SOCKETARRAY m_PortArray;
  45. };
  46. #endif //_PORTS_H_