Files
mirror-processhacker/2.x/trunk/plugins/UserNotes/db.h
T
dmex 05534961c1 UserNotes: added copyrights; added missing solution filters;
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@6137 21ef857c-d57f-4fe0-8362-d861dc6d29cd
2015-06-23 10:51:04 +00:00

85 lines
1.6 KiB
C

/*
* Process Hacker User Notes -
* database functions
*
* Copyright (C) 2011-2015 wj32
*
* 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 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;
} DB_OBJECT, *PDB_OBJECT;
VOID InitializeDb(
VOID
);
ULONG GetNumberOfDbObjects(
VOID
);
VOID LockDb(
VOID
);
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
);
#endif