BOOLEAN KillProcess(ULONG PID)
NTSTATUS ntStatus = STATUS_SUCCESS;
ntStatus = PsLookupProcessByProcessId(PID, &pEprcess);
if (NT_SUCCESS(ntStatus))
if (ObOpenObjectByPointer((PVOID)pEprcess, 0, NULL, 0, NULL, KernelMode, &hProcess) != STATUS_SUCCESS)
ZwTerminateProcess((HANDLE)hProcess, STATUS_SUCCESS);
ZwClose((HANDLE)hProcess);