Driver: PsTree: Add OBJ_KERNEL_HANDLE to ObOpenObjectByPointer()

This commit is contained in:
Nodir Temirkhodjaev 2023-02-09 15:04:26 +03:00
parent 9b758fba58
commit 47a454e42e

View File

@ -167,7 +167,8 @@ static HANDLE OpenProcessById(DWORD processId)
}
HANDLE processHandle;
status = ObOpenObjectByPointer(peProcess, 0, NULL, 0, 0, KernelMode, &processHandle);
status = ObOpenObjectByPointer(
peProcess, OBJ_KERNEL_HANDLE, NULL, 0, 0, KernelMode, &processHandle);
ObDereferenceObject(peProcess);