-
Notifications
You must be signed in to change notification settings - Fork 29
/
diff.h
116 lines (83 loc) · 2.67 KB
/
diff.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
106
107
108
109
110
111
112
113
114
115
116
/*
Copyright (C) 2011 Jay Satiro <[email protected]>
All rights reserved.
This file is part of GetHooks.
GetHooks is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
GetHooks is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GetHooks. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef _DIFF_H
#define _DIFF_H
#include <windows.h>
/* snapshot store (system process info, gui threads, desktop hooks) */
#include "snapshot.h"
/* desktop hook store (linked list of desktop and hook information) */
#include "desktop_hook.h"
#ifdef __cplusplus
extern "C" {
#endif
/* the diff types */
enum difftype
{
/* every HOOK in the initial snapshot is "found" */
HOOK_FOUND = 1,
/* a HOOK that is present in the current snapshot but not in the previous */
HOOK_ADDED,
/* a HOOK that is present in both the previous and current snapshots but has changed */
HOOK_MODIFIED,
/* a HOOK that is present in the previous snapshot but not in the current */
HOOK_REMOVED
};
/* thread info as it pertains to a HOOK */
enum threadtype
{
/* the thread that owns the HOOK */
THREAD_OWNER = 1,
/* the thread that the HOOK originated from */
THREAD_ORIGIN,
/* the thread that is hooked */
THREAD_TARGET
};
/**
these functions are documented in the comment block above their definitions in diff.c
*/
void print_brief_thread_info(
const struct hook *const hook, // in
const enum threadtype threadtype // in
);
void print_hook_notice_begin(
const struct hook *const hook, // in
const WCHAR *const deskname, // in
const enum difftype difftype // in
);
void print_hook_notice_end( void );
int print_diff_hook(
const struct hook *const a, // in
const struct hook *const b, // in
const WCHAR *const deskname // in
);
void print_diff_desktop_hook_items(
const struct desktop_hook_item *const a, // in
const struct desktop_hook_item *const b // in
);
void print_diff_desktop_hook_lists(
const struct desktop_hook_list *const list_a, // in
const struct desktop_hook_list *const list_b // in
);
unsigned print_initial_desktop_hook_item(
const struct desktop_hook_item *const item // in
);
unsigned print_initial_desktop_hook_list(
const struct desktop_hook_list *const list // in
);
#ifdef __cplusplus
}
#endif
#endif // _DIFF_H