Files
systeminformer/plugins/UserNotes/db.h
T
dmex 2f0651ece6 Update solution (#1306)
* Fix MSVC incorrectly loading symbols for non-executable images loaded on Windows 7
* Add PhCopyFileWin32
* Add PhGetApplicationDirectoryFileNameWin32
* Add PhGetKernelDriverSystemStart
* Add PhGetTemporaryDirectoryRandomAlphaFileName
* Update branding, guids and strings
* Improve temporary filename generation
* BuildTools: Fix Windows SDK detection #1305
* UserNotes: Add support for saving process boost priority #1244
* Add plugin support for subclassing priority boost menu
* Fix changing process affinity on Windows 7 #1299
* ExtendedTools: Add WDDM 3.1 versioning, Fix GPU graph values sometimes not matching Taskmgr
* WindowExplorer: Move dpi context value, Fix missing window icons
* Fix clang builds
* BuildTools: Fix Windows SDK detection #1305
2022-07-17 13:01:56 +10:00

108 lines
1.8 KiB
C

/*
* Copyright (c) 2022 Winsider Seminars & Solutions, Inc. All rights reserved.
*
* This file is part of System Informer.
*
* Authors:
*
* wj32 2011-2015
* dmex 2016-2022
*
*/
#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;
KAFFINITY AffinityMask;
ULONG PagePriorityPlusOne;
BOOLEAN Boost;
} 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
);
_Success_(return)
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