13 printf("%s:%i - %s", __FILE__, __LINE__, x); \
14 DbgPrint("%s:%i - %s", __FILE__, __LINE__, x);
32 WORD wVersionRequested;
40 wVersionRequested =
MAKEWORD( 2, 2 );
42 DBG(
"Calling WSAStartup\n");
47 DBG(
"WSAStartup failed\n");
61 DBG(
"WSAStartup version unacceptable\n");
68 DBG(
"Calling socket\n");
72 DBG(
"socket failed\n");
79 addrLen =
sizeof(selfAddr);
80 DBG(
"Calling bind\n");
87 DBG(
"Calling getsockname\n");
90 DBG(
"getsockname failed\n");
94 DBG(
"Calling listen\n");
96 DBG(
"listen failed\n");
100 DBG(
"Calling socket\n");
103 DBG(
"socket failed\n");
117 DBG(
"Calling connect\n");
120 DBG(
"connect failed\n");
129 DBG(
"Calling getsockname\n");
132 DBG(
"getsockname failed\n");
136 DBG(
"Calling accept\n");
137 osfd[1] =
accept(listenSock, (
struct sockaddr *) &peerAddr, &addrLen);
139 DBG(
"accept failed\n");
144 DBG(
"peerAddr.sin_port != selfAddr.sin_port\n");
184 DBG(
"Calling CreateFileMappingA\n");
189 DBG(
"CreateFileMappingA failed\n");
194 DBG(
"Calling MapViewOfFile\n");
198 DBG(
"MapViewOfFile failed\n");
206 DBG(
"MapViewOfFile returned ERROR_ALREADY_EXISTS\n");
207 DBG(
"This really shouldn't happen, but it's not fatal.\n");
214 DBG(
"Calling VirtualAlloc\n");
217 DBG(
"VirtualAlloc failed\n");
237 printf(
"Valid test names:\n");
ACPI_SIZE strlen(const char *String)
#define INVALID_HANDLE_VALUE
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
INT WINAPI WSAStartup(IN WORD wVersionRequested, OUT LPWSADATA lpWSAData)
HANDLE NTAPI CreateFileMappingA(IN HANDLE hFile, IN LPSECURITY_ATTRIBUTES lpFileMappingAttributes, IN DWORD flProtect, IN DWORD dwMaximumSizeHigh, IN DWORD dwMaximumSizeLow, IN LPCSTR lpName)
#define ERROR_ALREADY_EXISTS
INT WSAAPI getsockname(IN SOCKET s, OUT LPSOCKADDR name, IN OUT INT FAR *namelen)
INT WSAAPI listen(IN SOCKET s, IN INT backlog)
INT WSAAPI bind(IN SOCKET s, IN CONST struct sockaddr *name, IN INT namelen)
SOCKET WSAAPI accept(IN SOCKET s, OUT LPSOCKADDR addr, OUT INT FAR *addrlen)
SOCKET WSAAPI socket(IN INT af, IN INT type, IN INT protocol)
WORD WORD PSZ PSZ pszFileName
LPVOID NTAPI VirtualAlloc(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flAllocationType, IN DWORD flProtect)
DWORD WINAPI GetLastError(void)
#define FILE_MAP_ALL_ACCESS
int PASCAL FAR WSACleanup(void)