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.

70 lines
952 B

  1. /*++
  2. Copyright (C) 2001 Microsoft Corporation
  3. All rights reserved.
  4. Module Name:
  5. NCsockets.hxx
  6. Abstract:
  7. Declares functions and classes that expose sockets functionality.
  8. Author:
  9. Felix Maxa (AMaxa) 16 May 2001
  10. Revision History:
  11. --*/
  12. #ifndef _NCSOCKETS_HXX_
  13. #define _NCSOCKETS_HXX_
  14. HRESULT
  15. GetWSAErrorAsHResult(
  16. VOID
  17. );
  18. HRESULT
  19. IsIPAddress(
  20. IN LPCWSTR pszName
  21. );
  22. //
  23. // Class for easy WSA start up and clean up
  24. //
  25. class TWinsockStart
  26. {
  27. SIGNATURE('WSST');
  28. public:
  29. TWinsockStart(
  30. IN DWORD MajorVersion = 2,
  31. IN DWORD MinorVersion = 0
  32. );
  33. ~TWinsockStart(
  34. VOID
  35. );
  36. HRESULT
  37. Valid(
  38. IN VOID
  39. ) CONST;
  40. private:
  41. //
  42. // Copying and assignment are not defined.
  43. //
  44. NO_COPY(TWinsockStart);
  45. WSADATA m_WSAData;
  46. HRESULT m_hr;
  47. };
  48. #endif //_NCSOCKETS_HXX_