[uxtheme]
[reactos.git] / rostests / apitests / ws2_32 / ws2_32.h
1 /*
2 * PROJECT: ws2_32.dll API tests
3 * LICENSE: GPLv2 or any later version
4 * FILE: apitests/ws2_32/ws2_32.h
5 * PURPOSE: Main header file
6 * COPYRIGHT: Copyright 2008 Colin Finck <mail@colinfinck.de>
7 */
8
9 #ifndef _WS2_32_APITESTS_H
10 #define _WS2_32_APITESTS_H
11
12 #include <winsock2.h>
13
14 /* Simple macro for executing a socket command and doing cleanup operations in case of a failure */
15 #define SCKTEST(_cmd_) \
16 iResult = _cmd_; \
17 ok(iResult != SOCKET_ERROR, "iResult = %d\n", iResult); \
18 if(iResult == SOCKET_ERROR) \
19 { \
20 printf("Winsock error code is %u\n", WSAGetLastError()); \
21 closesocket(sck); \
22 WSACleanup(); \
23 return 0; \
24 }
25
26 /* helpers.c */
27 int CreateSocket(SOCKET* sck);
28 int ConnectToReactOSWebsite(SOCKET sck);
29 int GetRequestAndWait(SOCKET sck);
30
31 /* ws2_32.c */
32 extern HANDLE g_hHeap;
33
34 #endif