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
msclient.c
Go to the documentation of this file.
1
#include <stdio.h>
2
#include <stdlib.h>
3
#include <string.h>
4
#include <windows.h>
5
#include <tchar.h>
6
7
#define BUFSIZE 1024
8
#define MAILSLOT_TIMEOUT 1000
9
10
11
int
main
(
int
argc
,
char
*
argv
[])
12
{
13
HANDLE
hMailslot;
14
LPSTR
lpszMailslotName =
"\\\\.\\MAILSLOT\\mymailslot"
;
15
LPSTR
lpszTestMessage =
"Mailslot test message!"
;
16
DWORD
cbLength, cbWritten;
17
18
hMailslot =
CreateFile
(lpszMailslotName,
19
GENERIC_WRITE
,
20
FILE_SHARE_READ
,
21
(
LPSECURITY_ATTRIBUTES
)
NULL
,
22
OPEN_EXISTING
,
23
FILE_ATTRIBUTE_NORMAL
,
24
(
HANDLE
)
NULL
);
25
printf
(
"hMailslot %x\n"
, (
DWORD
)hMailslot);
26
if
(hMailslot ==
INVALID_HANDLE_VALUE
)
27
{
28
printf
(
"CreateFile() failed\n"
);
29
return
0;
30
}
31
32
cbLength = (
ULONG
)
strlen
(lpszTestMessage)+1;
33
34
WriteFile
(hMailslot,
35
lpszTestMessage,
36
cbLength,
37
&cbWritten,
38
NULL
);
39
40
CloseHandle
(hMailslot);
41
42
return
0;
43
}
44
45
/* EOF */
46
argc
static int argc
Definition:
ServiceArgs.c:12
strlen
ACPI_SIZE strlen(const char *String)
Definition:
utclib.c:269
NULL
#define NULL
Definition:
types.h:112
CloseHandle
#define CloseHandle
Definition:
compat.h:739
OPEN_EXISTING
#define OPEN_EXISTING
Definition:
compat.h:775
INVALID_HANDLE_VALUE
#define INVALID_HANDLE_VALUE
Definition:
compat.h:731
FILE_ATTRIBUTE_NORMAL
#define FILE_ATTRIBUTE_NORMAL
Definition:
compat.h:137
FILE_SHARE_READ
#define FILE_SHARE_READ
Definition:
compat.h:136
WriteFile
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition:
rw.c:24
main
int main()
Definition:
test.c:6
DWORD
unsigned long DWORD
Definition:
ntddk_ex.h:95
printf
#define printf
Definition:
freeldr.h:97
void
Definition:
nsiface.idl:2307
argv
#define argv
Definition:
mplay32.c:18
GENERIC_WRITE
#define GENERIC_WRITE
Definition:
nt_native.h:90
_SECURITY_ATTRIBUTES
Definition:
compat.h:191
ULONG
uint32_t ULONG
Definition:
typedefs.h:59
CreateFile
#define CreateFile
Definition:
winbase.h:3780
LPSTR
char * LPSTR
Definition:
xmlstorage.h:182
modules
rostests
tests
mstest
msclient.c
Generated on Sun Mar 30 2025 06:09:05 for ReactOS by
1.9.6