ReactOS
0.4.16-dev-1059-gb1cf981
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
load.c
Go to the documentation of this file.
1
/*
2
* Load a device driver
3
*/
4
#define WIN32_NO_STATUS
5
#include <windows.h>
6
#include <stdlib.h>
7
#include <
ntndk.h
>
8
9
int
wmain
(
int
argc
,
WCHAR
*
argv
[])
10
{
11
NTSTATUS
Status
;
12
UNICODE_STRING
ServiceName
;
13
14
if
(
argc
!= 2)
15
{
16
wprintf
(
L
"Usage: load <ServiceName>\n"
);
17
return
0;
18
}
19
20
ServiceName
.Length = (
USHORT
)((52 +
wcslen
(
argv
[1])) *
sizeof
(
WCHAR
));
21
ServiceName
.MaximumLength =
ServiceName
.Length +
sizeof
(
UNICODE_NULL
);
22
ServiceName
.Buffer =
malloc
(
ServiceName
.MaximumLength);
23
wsprintf
(
ServiceName
.Buffer,
24
L
"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\%s"
,
25
argv
[1]);
26
wprintf
(
L
"Loading %wZ\n"
, &
ServiceName
);
27
28
Status
=
NtLoadDriver
(&
ServiceName
);
29
free
(
ServiceName
.Buffer);
30
if
(!
NT_SUCCESS
(
Status
))
31
{
32
wprintf
(
L
"Failed: 0x%08lx\n"
,
Status
);
33
return
1;
34
}
35
36
return
0;
37
}
argc
static int argc
Definition:
ServiceArgs.c:12
NTSTATUS
LONG NTSTATUS
Definition:
precomp.h:26
ServiceName
static WCHAR ServiceName[]
Definition:
browser.c:19
free
#define free
Definition:
debug_ros.c:5
malloc
#define malloc
Definition:
debug_ros.c:4
NT_SUCCESS
#define NT_SUCCESS(StatCode)
Definition:
apphelp.c:33
Status
Status
Definition:
gdiplustypes.h:25
wcslen
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
argv
#define argv
Definition:
mplay32.c:18
UNICODE_NULL
#define UNICODE_NULL
ntndk.h
NtLoadDriver
NTSTATUS NTAPI NtLoadDriver(IN PUNICODE_STRING DriverServiceName)
Definition:
driver.c:2165
L
#define L(x)
Definition:
ntvdm.h:50
USHORT
unsigned short USHORT
Definition:
pedump.c:61
wmain
int wmain()
Definition:
rdesktop-core-tester.cpp:552
_UNICODE_STRING
Definition:
env_spec_w32.h:368
wprintf
#define wprintf(...)
Definition:
whoami.c:18
wsprintf
#define wsprintf
Definition:
winuser.h:5885
WCHAR
__wchar_t WCHAR
Definition:
xmlstorage.h:180
modules
rosapps
applications
sysutils
utils
driver
load
load.c
Generated on Wed Apr 30 2025 06:07:50 for ReactOS by
1.9.6