ReactOS
0.4.16-dev-927-g467dec4
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
sb.c
Go to the documentation of this file.
1
#include <stdio.h>
2
#include <windows.h>
3
#include <ntddk.h>
4
5
int
main
()
6
{
7
// NTSTATUS s;
8
// PHANDLE Handle;
9
// PIO_STATUS_BLOCK Status;
10
11
HANDLE
Device
;
12
DWORD
BytesReturned
;
13
14
printf
(
"SB Test\n"
);
15
16
Device
=
CreateFile
(
"\\\\.\\SndBlst"
,
GENERIC_READ
|
GENERIC_WRITE
,
17
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
18
NULL
,
19
OPEN_EXISTING
,
20
FILE_FLAG_NO_BUFFERING
,
21
NULL
);
22
23
if
(
Device
==
INVALID_HANDLE_VALUE
)
24
{
25
printf
(
"Device is busy or could not be found.\n"
);
26
return
-1;
27
}
28
29
// DeviceIoControl(
30
// Device,
31
// IOCTL_FILE_DISK_OPEN_FILE,
32
// OpenFileInformation,
33
// sizeof(OPEN_FILE_INFORMATION) + OpenFileInformation->FileNameLength - 1,
34
// NULL
35
// 0,
36
// &BytesReturned,
37
// NULL
38
// )
39
40
41
/* s = IoCreateFile(Handle, GENERIC_READ | GENERIC_WRITE,
42
OBJ_KERNEL_HANDLE,
43
Status,
44
0,
45
FILE_SHARE_READ | FILE_SHARE_WRITE,
46
FILE_OPEN,
47
FILE_NON_DIRECTORY_FILE,
48
NULL,
49
0,
50
CreateFileTypeNone,
51
NULL,
52
0);
53
*/
54
}
NULL
#define NULL
Definition:
types.h:112
OPEN_EXISTING
#define OPEN_EXISTING
Definition:
compat.h:775
INVALID_HANDLE_VALUE
#define INVALID_HANDLE_VALUE
Definition:
compat.h:731
GENERIC_READ
#define GENERIC_READ
Definition:
compat.h:135
FILE_SHARE_READ
#define FILE_SHARE_READ
Definition:
compat.h:136
DWORD
unsigned long DWORD
Definition:
ntddk_ex.h:95
printf
#define printf
Definition:
freeldr.h:97
void
Definition:
nsiface.idl:2307
FILE_FLAG_NO_BUFFERING
#define FILE_FLAG_NO_BUFFERING
Definition:
disk.h:45
FILE_SHARE_WRITE
#define FILE_SHARE_WRITE
Definition:
nt_native.h:681
GENERIC_WRITE
#define GENERIC_WRITE
Definition:
nt_native.h:90
main
int main()
Definition:
sb.c:5
Device
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition:
wdfchildlist.h:474
BytesReturned
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_ ULONG _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesReturned
Definition:
wdfiotarget.h:1052
CreateFile
#define CreateFile
Definition:
winbase.h:3780
drivers
multimedia
audio
sndblst.old
test
sb.c
Generated on Sun Mar 30 2025 06:05:55 for ReactOS by
1.9.6