| 39 | } |
| 40 | |
| 41 | NTSTATUS 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 | |
| 56 | NTSTATUS NtQueryInformationThread(_In_ HANDLE ThreadHandle, _In_ THREADINFOCLASS ThreadInformationClass, _Out_ PVOID ThreadInformation, _In_ ULONG ThreadInformationLength, _Out_ PULONG ReturnLength) |
| 57 | { |
no outgoing calls
no test coverage detected