ReactOS
0.4.16-dev-336-gb667d82
ws2_32.h
Go to the documentation of this file.
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 <
ntstatus.h
>
13
#include <stdio.h>
14
15
#define WIN32_NO_STATUS
16
#define _INC_WINDOWS
17
#define COM_NO_WINDOWS_H
18
19
#include <
apitest.h
>
20
#include <
ws2tcpip.h
>
21
#include <
ndk/rtlfuncs.h
>
22
#include <
ndk/mmfuncs.h
>
23
24
/* Simple macro for executing a socket command and doing cleanup operations in case of a failure */
25
#define SCKTEST(_cmd_) \
26
iResult = _cmd_; \
27
ok(iResult != SOCKET_ERROR, "iResult = %d\n"
, iResult); \
28
if(iResult == SOCKET_ERROR) \
29
{ \
30
printf("Winsock error code is %u\n", WSAGetLastError()); \
31
closesocket(sck); \
32
WSACleanup(); \
33
return 0; \
34
}
35
36
/* helpers.c */
37
int
CreateSocket
(
SOCKET
* sck);
38
int
ConnectToReactOSWebsite
(
SOCKET
sck);
39
int
GetRequestAndWait
(
SOCKET
sck);
40
41
/* ws2_32.c */
42
extern
HANDLE
g_hHeap
;
43
44
#endif
/* !_WS2_32_APITESTS_H */
apitest.h
void
Definition:
nsiface.idl:2307
GetRequestAndWait
int GetRequestAndWait(SOCKET sck)
Definition:
helpers.c:45
g_hHeap
HANDLE g_hHeap
Definition:
globals.c:52
ConnectToReactOSWebsite
int ConnectToReactOSWebsite(SOCKET sck)
Definition:
helpers.c:27
mmfuncs.h
rtlfuncs.h
ntstatus.h
CreateSocket
static void CreateSocket(void)
Definition:
telnetd.c:102
SOCKET
UINT_PTR SOCKET
Definition:
winsock.h:47
ws2tcpip.h
modules
rostests
apitests
ws2_32
ws2_32.h
Generated on Tue Dec 10 2024 06:08:12 for ReactOS by
1.9.6