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.

108 lines
2.8 KiB

  1. /*
  2. * wsw.h
  3. *
  4. * $Revision: 1.5 $
  5. * $Date: Jul 30 1996 15:27:14 $
  6. * $Author: MLEWIS1 $
  7. *
  8. * Notes:
  9. * Winsock2.h must be included before including this file.
  10. * Before including winsock2.h, the symbol INCL_WINSOCK_API_TYPEDEFS
  11. * must be #defined as 1.
  12. */
  13. #ifndef __WSW_H
  14. #define __WSW_H
  15. #ifndef INCL_WINSOCK_API_TYPEDEFS
  16. #define INCL_WINSOCK_API_TYPEDEFS 1
  17. #endif
  18. #include <winsock2.h>
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. extern LPFN_WSASTARTUP WSWStartup;
  23. extern LPFN_WSACLEANUP WSWCleanup;
  24. extern LPFN_BIND WSWbind;
  25. extern LPFN_CLOSESOCKET WSWclosesocket;
  26. extern LPFN_GETHOSTBYNAME WSWgethostbyname;
  27. extern LPFN_GETHOSTBYADDR WSWgethostbyaddr;
  28. extern LPFN_GETHOSTNAME WSWgethostname;
  29. extern LPFN_GETSOCKNAME WSWgetsockname;
  30. extern LPFN_GETSOCKOPT WSWgetsockopt;
  31. extern LPFN_HTONL WSWhtonl;
  32. extern LPFN_HTONS WSWhtons;
  33. extern LPFN_INET_ADDR WSWinet_addr;
  34. extern LPFN_INET_NTOA WSWinet_ntoa;
  35. extern LPFN_IOCTLSOCKET WSWioctlsocket;
  36. extern LPFN_NTOHL WSWntohl;
  37. extern LPFN_NTOHS WSWntohs;
  38. extern LPFN_RECVFROM WSWrecvfrom;
  39. extern LPFN_SENDTO WSWsendto;
  40. extern LPFN_SETSOCKOPT WSWsetsockopt;
  41. extern LPFN_SHUTDOWN WSWshutdown;
  42. extern LPFN_SOCKET WSWsocket;
  43. extern LPFN_WSAHTONL WSWHtonl;
  44. extern LPFN_WSAHTONS WSWHtons;
  45. extern LPFN_WSANTOHL WSWNtohl;
  46. extern LPFN_WSANTOHS WSWNtohs;
  47. extern LPFN_WSAIOCTL WSWIoctl;
  48. extern LPFN_WSAASYNCSELECT WSWAsyncSelect;
  49. extern LPFN_WSAGETLASTERROR WSWGetLastError;
  50. extern LPFN_WSAENUMPROTOCOLSW WSWEnumProtocolsW;
  51. extern LPFN_WSAENUMPROTOCOLSA WSWEnumProtocolsA;
  52. extern LPFN_WSARECVFROM WSWRecvFrom;
  53. extern LPFN_WSASENDTO WSWSendTo;
  54. extern LPFN_WSASOCKETW WSWSocketW;
  55. extern LPFN_WSASOCKETA WSWSocketA;
  56. #define WSAStartup WSWStartup
  57. #define WSACleanup WSWCleanup
  58. #define bind WSWbind
  59. #define closesocket WSWclosesocket
  60. #define gethostbyname WSWgethostbyname
  61. #define gethostbyaddr WSWgethostbyaddr
  62. #define gethostname WSWgethostname
  63. #define getsockname WSWgetsockname
  64. #define getsockopt WSWgetsockopt
  65. #define htonl WSWhtonl
  66. #define htons WSWhtons
  67. #define inet_addr WSWinet_addr
  68. #define inet_ntoa WSWinet_ntoa
  69. #define ioctlsocket WSWioctlsocket
  70. #define ntohl WSWntohl
  71. #define ntohs WSWntohs
  72. #define recvfrom WSWrecvfrom
  73. #define sendto WSWsendto
  74. #define setsockopt WSWsetsockopt
  75. #define shutdown WSWshutdown
  76. #define socket WSWsocket
  77. #define WSAHtonl WSWHtonl
  78. #define WSAHtons WSWHtons
  79. #define WSANtohl WSWNtohl
  80. #define WSANtohs WSWNtohs
  81. #define WSAIoctl WSWIoctl
  82. #define WSAAsyncSelect WSWAsyncSelect
  83. #define WSAGetLastError WSWGetLastError
  84. #undef WSAEnumProtocols
  85. #ifdef UNICODE
  86. #define WSAEnumProtocols WSWEnumProtocolsW
  87. #else
  88. #define WSAEnumProtocols WSWEnumProtocolsA
  89. #endif
  90. #define WSARecvFrom WSWRecvFrom
  91. #define WSASendTo WSWSendTo
  92. #undef WSASocket
  93. #ifdef UNICODE
  94. #define WSASocket WSWSocketW
  95. #else
  96. #define WSASocket WSWSocketA
  97. #endif
  98. #ifdef __cplusplus
  99. }
  100. #endif
  101. #endif // not __WSW_H
  102.