ReactOS
0.4.16-dev-1078-g21d3e29
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
apc2.c
Go to the documentation of this file.
1
2
#include <windows.h>
3
#include <stdio.h>
4
5
VOID
CALLBACK
TimerApcProc
(
6
LPVOID
lpArg,
7
DWORD
dwTimerLowValue,
8
DWORD
dwTimerHighValue )
9
{
10
printf
(
"APC Callback %lu\n"
, *(
PDWORD
)lpArg);
11
}
12
13
14
int
main
()
15
{
16
HANDLE
hTimer;
17
BOOL
bSuccess;
18
LARGE_INTEGER
DueTime
;
19
DWORD
value
= 1;
20
21
hTimer =
CreateWaitableTimer
(
NULL
,
FALSE
,
NULL
);
22
23
if
(!hTimer)
24
{
25
printf
(
"CreateWaitableTimer failed!\n"
);
26
return
0;
27
}
28
29
DueTime
.QuadPart = -(
LONGLONG
)(5 * 10000000);
30
31
bSuccess =
SetWaitableTimer
(
32
hTimer,
33
&
DueTime
,
34
2001
/*interval (using an odd number to be able to find it easy in kmode) */
,
35
TimerApcProc
,
36
&
value
/*callback argument*/
,
37
FALSE
);
38
39
if
(!bSuccess)
40
{
41
printf
(
"SetWaitableTimer failed!\n"
);
42
return
0;
43
}
44
45
for
(;
value
<= 10;
value
++ )
46
{
47
SleepEx
(
INFINITE
,
TRUE
/*alertable*/
);
48
}
49
50
CloseHandle
( hTimer );
51
return
0;
52
}
53
TimerApcProc
VOID CALLBACK TimerApcProc(LPVOID lpArg, DWORD dwTimerLowValue, DWORD dwTimerHighValue)
Definition:
apc2.c:5
main
int main()
Definition:
apc2.c:14
NULL
#define NULL
Definition:
types.h:112
TRUE
#define TRUE
Definition:
types.h:120
FALSE
#define FALSE
Definition:
types.h:117
CloseHandle
#define CloseHandle
Definition:
compat.h:739
CALLBACK
#define CALLBACK
Definition:
compat.h:35
INFINITE
#define INFINITE
Definition:
serial.h:102
BOOL
unsigned int BOOL
Definition:
ntddk_ex.h:94
DWORD
unsigned long DWORD
Definition:
ntddk_ex.h:95
printf
#define printf
Definition:
freeldr.h:97
void
Definition:
nsiface.idl:2307
PDWORD
DWORD * PDWORD
Definition:
pedump.c:68
SleepEx
DWORD WINAPI SleepEx(IN DWORD dwMilliseconds, IN BOOL bAlertable)
Definition:
synch.c:802
SetWaitableTimer
BOOL WINAPI SetWaitableTimer(IN HANDLE hTimer, IN const LARGE_INTEGER *pDueTime, IN LONG lPeriod, IN PTIMERAPCROUTINE pfnCompletionRoutine OPTIONAL, IN OPTIONAL LPVOID lpArgToCompletionRoutine, IN BOOL fResume)
Definition:
synch.c:382
LONGLONG
int64_t LONGLONG
Definition:
typedefs.h:68
_LARGE_INTEGER
Definition:
typedefs.h:103
value
Definition:
pdh_main.c:96
DueTime
_In_ WDFTIMER _In_ LONGLONG DueTime
Definition:
wdftimer.h:190
CreateWaitableTimer
#define CreateWaitableTimer
Definition:
winbase.h:3792
modules
rostests
tests
apc2
apc2.c
Generated on Sun May 4 2025 06:04:27 for ReactOS by
1.9.6