mirror of
https://github.com/JKornev/hidden
synced 2024-06-25 00:18:04 +00:00
37 lines
1.2 KiB
C
37 lines
1.2 KiB
C
#pragma once
|
|
|
|
#include <Ntddk.h>
|
|
|
|
typedef struct _ProcessTableEntry {
|
|
HANDLE processId;
|
|
|
|
BOOLEAN excluded;
|
|
ULONG inheritExclusion;
|
|
|
|
BOOLEAN protected;
|
|
ULONG inheritProtection;
|
|
|
|
BOOLEAN hidden;
|
|
ULONG inheritStealth;
|
|
PEPROCESS reference;
|
|
|
|
BOOLEAN subsystem;
|
|
BOOLEAN inited;
|
|
|
|
} ProcessTableEntry, *PProcessTableEntry;
|
|
|
|
NTSTATUS InitializeProcessTable(VOID(*InitProcessEntryCallback)(PProcessTableEntry, PCUNICODE_STRING, HANDLE));
|
|
VOID ClearProcessTable(VOID(*CleanupCallback)(PProcessTableEntry));
|
|
VOID EnumProcessTable(VOID(*EnumCallback)(PProcessTableEntry));
|
|
|
|
// Important notice:
|
|
// Keep in mind that internal sync mechanisms removed from functions below (including DestroyProcessTable)
|
|
// because in some situations we need to perform two operation under one lock, for instance we should
|
|
// perform GetProcessInProcessTable and UpdateProcessInProcessTable under one lock. So in this case all
|
|
// functions, excluding InitializeProcessTable, should be synced manualy from external code
|
|
|
|
BOOLEAN AddProcessToProcessTable(PProcessTableEntry entry);
|
|
BOOLEAN RemoveProcessFromProcessTable(PProcessTableEntry entry);
|
|
BOOLEAN GetProcessInProcessTable(PProcessTableEntry entry);
|
|
BOOLEAN UpdateProcessInProcessTable(PProcessTableEntry entry);
|