-
Notifications
You must be signed in to change notification settings - Fork 3
/
event.h
105 lines (81 loc) · 1.83 KB
/
event.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*
* Copyright (c) 2004 Security Architects Corporation. All rights reserved.
*
* Module Name:
*
* event.h
*
* Abstract:
*
* This module defines various types used by event hooking routines.
*
* Author:
*
* Eugene Tsyrklevich 09-Mar-2004
*
* Revision History:
*
* None.
*/
#ifndef __EVENT_H__
#define __EVENT_H__
/*
* ZwCreateEvent creates or opens an event object. [NAR]
*/
typedef NTSTATUS (*fpZwCreateEvent) (
OUT PHANDLE EventHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN EVENT_TYPE EventType,
IN BOOLEAN InitialState
);
NTSTATUS HookedNtCreateEvent(
OUT PHANDLE EventHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN EVENT_TYPE EventType,
IN BOOLEAN InitialState
);
/*
* ZwOpenEvent opens an event object. [NAR]
*/
typedef NTSTATUS (*fpZwOpenEvent) (
OUT PHANDLE EventHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
NTSTATUS HookedNtOpenEvent(
OUT PHANDLE EventHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
/*
* ZwCreateEventPair creates or opens an event pair object. [NAR]
*/
typedef NTSTATUS (*fpZwCreateEventPair) (
OUT PHANDLE EventPairHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
NTSTATUS HookedNtCreateEventPair(
OUT PHANDLE EventPairHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
/*
* ZwOpenEventPair opens an event pair object. [NAR]
*/
typedef NTSTATUS (*fpZwOpenEventPair) (
OUT PHANDLE EventPairHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
NTSTATUS
NTAPI
HookedNtOpenEventPair(
OUT PHANDLE EventPairHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
BOOLEAN InitEventHooks();
#endif /* __EVENT_H__ */