ReactOS
0.4.16-dev-433-g6363f78
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
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
_
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
nameserverlist.c
Go to the documentation of this file.
1
#include <stdio.h>
2
#include <stdlib.h>
3
#include <
winsock2.h
>
4
#include <
iphlpapi.h
>
5
6
int
main
(
int
argc
,
char
**
argv
) {
7
ULONG
OutBufLen = 0;
8
PFIXED_INFO
pFixedInfo;
9
PIP_ADDR_STRING
Addr;
10
11
GetNetworkParams
(
NULL
, &OutBufLen);
12
pFixedInfo =
malloc
(OutBufLen);
13
if
(!pFixedInfo) {
14
printf
(
"Failed to alloc %d bytes.\n"
, (
int
)OutBufLen );
15
return
1;
16
}
17
18
printf
(
"%d Bytes allocated\n"
, (
int
)OutBufLen );
19
20
GetNetworkParams
(pFixedInfo,&OutBufLen);
21
22
for
( Addr = &pFixedInfo->
DnsServerList
;
23
Addr;
24
Addr = Addr->
Next
) {
25
printf
(
"%c%s\n"
,
26
Addr == pFixedInfo->
CurrentDnsServer
?
'*'
:
' '
,
27
Addr->
IpAddress
.
String
);
28
}
29
30
free
( pFixedInfo );
31
return
0;
32
}
argc
static int argc
Definition:
ServiceArgs.c:12
free
#define free
Definition:
debug_ros.c:5
malloc
#define malloc
Definition:
debug_ros.c:4
NULL
#define NULL
Definition:
types.h:112
main
int main()
Definition:
test.c:6
printf
#define printf
Definition:
freeldr.h:97
iphlpapi.h
GetNetworkParams
DWORD WINAPI GetNetworkParams(PFIXED_INFO pFixedInfo, PULONG pOutBufLen)
Definition:
iphlpapi_main.c:1977
argv
#define argv
Definition:
mplay32.c:18
FIXED_INFO
Definition:
iptypes.h:80
FIXED_INFO::CurrentDnsServer
PIP_ADDR_STRING CurrentDnsServer
Definition:
iptypes.h:83
FIXED_INFO::DnsServerList
IP_ADDR_STRING DnsServerList
Definition:
iptypes.h:84
IP_ADDRESS_STRING::String
char String[4 *4]
Definition:
iptypes.h:42
_IP_ADDR_STRING
Definition:
iptypes.h:45
_IP_ADDR_STRING::Next
struct _IP_ADDR_STRING * Next
Definition:
iptypes.h:46
_IP_ADDR_STRING::IpAddress
IP_ADDRESS_STRING IpAddress
Definition:
iptypes.h:47
ULONG
uint32_t ULONG
Definition:
typedefs.h:59
winsock2.h
modules
rostests
tests
nameserverlist
nameserverlist.c
Generated on Tue Jan 7 2025 06:13:27 for ReactOS by
1.9.6