2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS WinSock 2 DLL
4 * FILE: include/ws2_32.h
5 * PURPOSE: WinSock 2 DLL header
10 #include <ddk/ntddk.h>
16 /* Exported by ntdll.dll, but where is the prototype? */
17 unsigned long strtoul(const char *nptr
, char **endptr
, int base
);
20 #define EXPORT STDCALL
22 extern HANDLE GlobalHeap
;
23 extern BOOL Initialized
; /* TRUE if WSAStartup() has been successfully called */
24 extern WSPUPCALLTABLE UpcallTable
;
27 typedef struct _WINSOCK_THREAD_BLOCK
{
28 INT LastErrorValue
; /* Error value from last function that failed */
29 CHAR Intoa
[16]; /* Buffer for inet_ntoa() */
30 } WINSOCK_THREAD_BLOCK
, *PWINSOCK_THREAD_BLOCK
;
35 #define WSAINITIALIZED (Initialized)
37 #define WSASETINITIALIZED (Initialized = TRUE)
42 /* DWORD network to host byte order conversion for little endian machines */
44 ((((dw) & 0xFF000000L) >> 24) | \
45 (((dw) & 0x00FF0000L) >> 8) | \
46 (((dw) & 0x0000FF00L) << 8) | \
47 (((dw) & 0x000000FFL) << 24))
49 /* DWORD host to network byte order conversion for little endian machines */
51 ((((dw) & 0xFF000000L) >> 24) | \
52 (((dw) & 0x00FF0000L) >> 8) | \
53 (((dw) & 0x0000FF00L) << 8) | \
54 (((dw) & 0x000000FFL) << 24))
56 /* WORD network to host order conversion for little endian machines */
58 ((((w) & 0xFF00) >> 8) | \
59 (((w) & 0x00FF) << 8))
61 /* WORD host to network byte order conversion for little endian machines */
63 ((((w) & 0xFF00) >> 8) | \
64 (((w) & 0x00FF) << 8))
68 /* DWORD network to host byte order conversion for big endian machines */
72 /* DWORD host to network byte order conversion big endian machines */
76 /* WORD network to host order conversion for big endian machines */
80 /* WORD host to network byte order conversion for big endian machines */
86 #endif /* __WS2_32_H */