MCPcopy Create free account
hub / github.com/D4stiny/PeaceMaker / NtQueryInformationProcess

Function NtQueryInformationProcess

PeaceMaker Kernel/common.cpp:41–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41NTSTATUS NtQueryInformationProcess(HANDLE ProcessHandle, PROCESSINFOCLASS ProcessInformationClass, PVOID ProcessInformation, ULONG ProcessInformationLength, PULONG ReturnLength)
42{
43 UNICODE_STRING funcName;
44 typedef NTSTATUS(NTAPI* NtQueryInformationProcess_t)(HANDLE ProcessHandle, PROCESSINFOCLASS ProcessInformationClass, PVOID ProcessInformation, ULONG ProcessInformationLength, PULONG ReturnLength);
45 static NtQueryInformationProcess_t fNtQueryInformationProcess = NULL;
46
47 if (fNtQueryInformationProcess == NULL)
48 {
49 RtlInitUnicodeString(&funcName, L"ZwQueryInformationProcess");
50 fNtQueryInformationProcess = RCAST<NtQueryInformationProcess_t>(MmGetSystemRoutineAddress(&funcName));
51 }
52
53 return fNtQueryInformationProcess(ProcessHandle, ProcessInformationClass, ProcessInformation, ProcessInformationLength, ReturnLength);
54}
55
56NTSTATUS NtQueryInformationThread(_In_ HANDLE ThreadHandle, _In_ THREADINFOCLASS ThreadInformationClass, _Out_ PVOID ThreadInformation, _In_ ULONG ThreadInformationLength, _Out_ PULONG ReturnLength)
57{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected