forked from winsiderss/systeminformer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb.h
More file actions
116 lines (97 loc) · 2.42 KB
/
Copy pathdb.h
File metadata and controls
116 lines (97 loc) · 2.42 KB
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
/*
* Process Hacker User Notes -
* database functions
*
* Copyright (C) 2011-2015 wj32
* Copyright (C) 2016-2020 dmex
*
* This file is part of Process Hacker.
*
* Process Hacker 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.
*
* Process Hacker 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 Process Hacker. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DB_H
#define DB_H
#define PLUGIN_NAME L"ProcessHacker.UserNotes"
#define SETTING_NAME_DATABASE_PATH (PLUGIN_NAME L".DatabasePath")
#define SETTING_NAME_CUSTOM_COLOR_LIST (PLUGIN_NAME L".ColorCustomList")
#define FILE_TAG 1
#define SERVICE_TAG 2
#define COMMAND_LINE_TAG 3
typedef struct _DB_OBJECT
{
ULONG Tag;
PH_STRINGREF Key;
PPH_STRING Name;
PPH_STRING Comment;
ULONG PriorityClass;
ULONG IoPriorityPlusOne;
COLORREF BackColor;
BOOLEAN Collapse;
ULONG_PTR AffinityMask;
ULONG PagePriorityPlusOne;
} DB_OBJECT, *PDB_OBJECT;
VOID InitializeDb(
VOID
);
ULONG GetNumberOfDbObjects(
VOID
);
_Acquires_exclusive_lock_(ObjectDbLock)
VOID LockDb(
VOID
);
_Releases_exclusive_lock_(ObjectDbLock)
VOID UnlockDb(
VOID
);
PDB_OBJECT FindDbObject(
_In_ ULONG Tag,
_In_ PPH_STRINGREF Name
);
PDB_OBJECT CreateDbObject(
_In_ ULONG Tag,
_In_ PPH_STRINGREF Name,
_In_opt_ PPH_STRING Comment
);
VOID DeleteDbObject(
_In_ PDB_OBJECT Object
);
VOID SetDbPath(
_In_ PPH_STRING Path
);
NTSTATUS LoadDb(
VOID
);
NTSTATUS SaveDb(
VOID
);
BOOLEAN FindIfeoObject(
_In_ PPH_STRINGREF Name,
_Out_opt_ PULONG CpuPriorityClass,
_Out_opt_ PULONG IoPriorityClass,
_Out_opt_ PULONG PagePriorityClass
);
NTSTATUS CreateIfeoObject(
_In_ PPH_STRINGREF Name,
_In_ ULONG CpuPriority,
_In_ ULONG IoPriority,
_In_ ULONG PagePriority
);
NTSTATUS DeleteIfeoObject(
_In_ PPH_STRINGREF Name,
_In_ ULONG CpuPriority,
_In_ ULONG IoPriority,
_In_ ULONG PagePriority
);
#endif