ReactOS
0.4.16-dev-1025-gd3456f5
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
nostartup.c
Go to the documentation of this file.
1
/*
2
* PROJECT: ReactOS api tests
3
* LICENSE: GPLv2+ - See COPYING in the top level directory
4
* PURPOSE: Test for WSAStartup
5
* PROGRAMMER: Sylvain Petreolle <sylvain.petreolle@reactos.org>
6
*/
7
8
#include "
ws2_32.h
"
9
10
// This test depends on WSAStartup not having been called
11
START_TEST
(nostartup)
12
{
13
int
Error
= 0;
14
ok
(
WSASocketA
(0, 0, 0,
NULL
, 0, 0) ==
INVALID_SOCKET
,
"WSASocketA should have failed\n"
);
15
16
WSASetLastError
(0xdeadbeef);
17
getservbyname
(
NULL
,
NULL
);
18
Error
=
WSAGetLastError
();
19
ok_dec
(
Error
,
WSANOTINITIALISED
);
20
21
WSASetLastError
(0xdeadbeef);
22
getservbyport
(0,
NULL
);
23
Error
=
WSAGetLastError
();
24
ok_dec
(
Error
,
WSANOTINITIALISED
);
25
26
WSASetLastError
(0xdeadbeef);
27
gethostbyname
(
NULL
);
28
Error
=
WSAGetLastError
();
29
ok_dec
(
Error
,
WSANOTINITIALISED
);
30
31
ok_dec
(
inet_addr
(
"127.0.0.1"
), 0x100007f);
32
}
inet_addr
ULONG WSAAPI inet_addr(IN CONST CHAR FAR *cp)
Definition:
addrconv.c:71
ok
#define ok(value,...)
Definition:
atltest.h:57
ok_dec
#define ok_dec(expression, result)
Definition:
atltest.h:101
START_TEST
#define START_TEST(x)
Definition:
atltest.h:75
Error
BOOL Error
Definition:
chkdsk.c:66
NULL
#define NULL
Definition:
types.h:112
WSASetLastError
VOID WSAAPI WSASetLastError(IN INT iError)
Definition:
dllmain.c:123
getservbyport
PSERVENT WSAAPI getservbyport(IN int port, IN const char FAR *proto)
Definition:
getxbyxx.c:431
gethostbyname
PHOSTENT WSAAPI gethostbyname(IN const char FAR *name)
Definition:
getxbyxx.c:221
getservbyname
PSERVENT WSAAPI getservbyname(IN const char FAR *name, IN const char FAR *proto)
Definition:
getxbyxx.c:500
ws2_32.h
WSASocketA
SOCKET WSAAPI WSASocketA(IN INT af, IN INT type, IN INT protocol, IN LPWSAPROTOCOL_INFOA lpProtocolInfo, IN GROUP g, IN DWORD dwFlags)
Definition:
socklife.c:444
WSANOTINITIALISED
#define WSANOTINITIALISED
Definition:
winerror.h:1987
WSAGetLastError
int PASCAL FAR WSAGetLastError(void)
Definition:
dllmain.c:112
INVALID_SOCKET
#define INVALID_SOCKET
Definition:
winsock.h:332
modules
rostests
apitests
ws2_32
nostartup.c
Generated on Wed Apr 23 2025 06:08:37 for ReactOS by
1.9.6