ReactOS
0.4.16-dev-297-gc569aee
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
lsdd.c
Go to the documentation of this file.
1
/*
2
* FILE : lsdd.c
3
* AUTHOR: Emanuele ALIBERTI
4
* DATE : 2000-08-04
5
* DESC : List DOS devices, i.e. symbolic links created
6
* in the \?? object manager's name space.
7
*/
8
#include <stdio.h>
9
#include <stdlib.h>
10
#include <stdarg.h>
11
12
#include <
windef.h
>
13
#include <
winbase.h
>
14
15
16
#include <reactos/buildno.h>
17
18
#include "../win32err.h"
19
20
#define LINKS_SIZE 32768
21
#define DEVICE_SIZE 8192
22
23
static
const
LPWSTR
error_prefix
=
L
"lsdd: "
;
24
25
static
char
SymbolicLinks
[
LINKS_SIZE
];
26
static
char
DosDeviceName
[
DEVICE_SIZE
];
27
28
static
char
DeviceNames
[
DEVICE_SIZE
];
29
static
char
DeviceName
[
DEVICE_SIZE
];
30
31
32
BOOL
33
WINAPI
34
GetNextString
(
35
char
* BufferIn,
36
char
* BufferOut,
37
char
** Next
38
)
39
{
40
char
*
next
= *Next;
41
char
*
w
;
42
43
if
(
'\0'
== *
next
)
return
FALSE
;
44
for
(
w
= BufferOut;
45
(
'\0'
!= *
next
);
46
next
++
47
)
48
{
49
*(
w
++) = *
next
;
50
}
51
*
w
=
'\0'
;
52
*Next = ++
next
;
53
return
TRUE
;
54
}
55
56
57
int
58
main
(
int
argc
,
char
*
argv
[] )
59
{
60
printf
(
61
"ReactOS/Win32 %s - List DOS Devices Utility\n"
62
"Written by E.Aliberti (%s)\n\n"
,
63
KERNEL_VERSION_STR,
64
__DATE__
65
);
66
67
if
(0 !=
QueryDosDevice
(
68
NULL
,
/* dump full directory */
69
SymbolicLinks
,
70
sizeof
SymbolicLinks
71
)
72
)
73
{
74
char
* NextDosDevice =
SymbolicLinks
;
75
char
* NextDevice;
76
77
while
(
TRUE
==
GetNextString
(
78
SymbolicLinks
,
79
DosDeviceName
,
80
& NextDosDevice
81
)
82
)
83
{
84
printf
(
"%s\n"
,
DosDeviceName
);
85
if
(0 !=
QueryDosDevice
(
86
DosDeviceName
,
87
DeviceNames
,
88
sizeof
DeviceNames
89
)
90
)
91
{
92
NextDevice =
DeviceNames
;
93
while
(
TRUE
==
GetNextString
(
94
DeviceNames
,
95
DeviceName
,
96
& NextDevice
97
)
98
)
99
{
100
printf
(
" -> \"%s\"\n"
,
DeviceName
);
101
}
102
}
103
else
104
{
105
PrintWin32Error
(
106
error_prefix
,
107
GetLastError
()
108
);
109
}
110
printf
(
"\n"
);
111
}
112
}
113
else
114
{
115
PrintWin32Error
(
116
error_prefix
,
117
GetLastError
()
118
);
119
return
EXIT_FAILURE
;
120
}
121
return
EXIT_SUCCESS
;
122
}
123
124
125
/* EOF */
argc
static int argc
Definition:
ServiceArgs.c:12
PrintWin32Error
VOID PrintWin32Error(IN LPWSTR Message, IN DWORD ErrorCode)
Definition:
main.c:146
NULL
#define NULL
Definition:
types.h:112
TRUE
#define TRUE
Definition:
types.h:120
FALSE
#define FALSE
Definition:
types.h:117
main
int main()
Definition:
test.c:6
BOOL
unsigned int BOOL
Definition:
ntddk_ex.h:94
printf
#define printf
Definition:
freeldr.h:97
w
GLubyte GLubyte GLubyte GLubyte w
Definition:
glext.h:6102
EXIT_FAILURE
#define EXIT_FAILURE
Definition:
jerror.c:33
DeviceNames
static char DeviceNames[DEVICE_SIZE]
Definition:
lsdd.c:28
DosDeviceName
static char DosDeviceName[DEVICE_SIZE]
Definition:
lsdd.c:26
LINKS_SIZE
#define LINKS_SIZE
Definition:
lsdd.c:20
GetNextString
BOOL WINAPI GetNextString(char *BufferIn, char *BufferOut, char **Next)
Definition:
lsdd.c:34
DEVICE_SIZE
#define DEVICE_SIZE
Definition:
lsdd.c:21
SymbolicLinks
static char SymbolicLinks[LINKS_SIZE]
Definition:
lsdd.c:25
error_prefix
static const LPWSTR error_prefix
Definition:
lsdd.c:23
argv
#define argv
Definition:
mplay32.c:18
L
#define L(x)
Definition:
ntvdm.h:50
next
static unsigned __int64 next
Definition:
rand_nt.c:6
EXIT_SUCCESS
#define EXIT_SUCCESS
Definition:
rdjpgcom.c:55
DeviceName
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition:
wdfdevice.h:3275
winbase.h
GetLastError
DWORD WINAPI GetLastError(void)
Definition:
except.c:1042
QueryDosDevice
#define QueryDosDevice
Definition:
winbase.h:3917
windef.h
WINAPI
#define WINAPI
Definition:
msvc.h:6
LPWSTR
WCHAR * LPWSTR
Definition:
xmlstorage.h:184
modules
rosapps
applications
sysutils
lsdd
lsdd.c
Generated on Wed Nov 27 2024 06:06:28 for ReactOS by
1.9.6