ReactOS
0.4.16-dev-1093-g93e9710
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
cicevent.h
Go to the documentation of this file.
1
/*
2
* PROJECT: ReactOS Cicero
3
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4
* PURPOSE: Cicero event object handling
5
* COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
6
*/
7
8
#pragma once
9
10
#include "
cicbase.h
"
11
12
class
CicEvent
13
{
14
HANDLE
m_hEvent
;
15
LPCTSTR
m_pszName
;
16
17
public
:
18
CicEvent
() :
m_hEvent
(
NULL
),
m_pszName
(
NULL
)
19
{
20
}
21
~CicEvent
()
22
{
23
Close
();
24
}
25
26
BOOL
Create
(
LPSECURITY_ATTRIBUTES
lpSA,
LPCTSTR
pszName)
27
{
28
if
(pszName)
29
m_pszName
= pszName;
30
if
(!
m_pszName
)
31
return
FALSE
;
32
m_hEvent
=
::CreateEvent
(lpSA,
FALSE
,
FALSE
,
m_pszName
);
33
return
(
m_hEvent
!=
NULL
);
34
}
35
BOOL
Open
(
LPCTSTR
pszName)
36
{
37
if
(pszName)
38
m_pszName
= pszName;
39
m_hEvent
=
::OpenEvent
(
EVENT_ALL_ACCESS
,
FALSE
,
m_pszName
);
40
return
(
m_hEvent
!=
NULL
);
41
}
42
void
Close
()
43
{
44
if
(
m_hEvent
)
45
{
46
::CloseHandle
(
m_hEvent
);
47
m_hEvent
=
NULL
;
48
}
49
}
50
51
BOOL
Wait
(
DWORD
dwMilliseconds)
52
{
53
return
(
::WaitForSingleObject
(
m_hEvent
, dwMilliseconds) ==
WAIT_OBJECT_0
);
54
}
55
};
cicbase.h
CicEvent
Definition:
cicevent.h:13
CicEvent::Close
void Close()
Definition:
cicevent.h:42
CicEvent::Wait
BOOL Wait(DWORD dwMilliseconds)
Definition:
cicevent.h:51
CicEvent::m_pszName
LPCTSTR m_pszName
Definition:
cicevent.h:15
CicEvent::m_hEvent
HANDLE m_hEvent
Definition:
cicevent.h:14
CicEvent::~CicEvent
~CicEvent()
Definition:
cicevent.h:21
CicEvent::Open
BOOL Open(LPCTSTR pszName)
Definition:
cicevent.h:35
CicEvent::CicEvent
CicEvent()
Definition:
cicevent.h:18
CicEvent::Create
BOOL Create(LPSECURITY_ATTRIBUTES lpSA, LPCTSTR pszName)
Definition:
cicevent.h:26
NULL
#define NULL
Definition:
types.h:112
FALSE
#define FALSE
Definition:
types.h:117
CloseHandle
#define CloseHandle
Definition:
compat.h:739
BOOL
unsigned int BOOL
Definition:
ntddk_ex.h:94
DWORD
unsigned long DWORD
Definition:
ntddk_ex.h:95
void
Definition:
nsiface.idl:2307
EVENT_ALL_ACCESS
#define EVENT_ALL_ACCESS
Definition:
isotest.c:82
_SECURITY_ATTRIBUTES
Definition:
compat.h:191
WaitForSingleObject
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition:
synch.c:82
CreateEvent
#define CreateEvent
Definition:
winbase.h:3779
WAIT_OBJECT_0
#define WAIT_OBJECT_0
Definition:
winbase.h:432
OpenEvent
#define OpenEvent
Definition:
winbase.h:3916
LPCTSTR
const CHAR * LPCTSTR
Definition:
xmlstorage.h:193
sdk
lib
cicero
cicevent.h
Generated on Mon May 5 2025 06:14:06 for ReactOS by
1.9.6