| 133 | namespace Terminator { |
| 134 | _IRQL_requires_max_(PASSIVE_LEVEL) |
| 135 | NTSTATUS TerminateProcessByPid(HANDLE ProcessId, NTSTATUS ExitStatus) { |
| 136 | HANDLE hProcess = NULL; |
| 137 | NTSTATUS Status = Descriptors::OpenProcess(ProcessId, &hProcess); |
| 138 | if (NT_SUCCESS(Status)) { |
| 139 | Status = TerminateProcess(hProcess, ExitStatus); |
| 140 | ZwClose(hProcess); |
| 141 | } |
| 142 | return Status; |
| 143 | } |
| 144 | |
| 145 | _IRQL_requires_max_(PASSIVE_LEVEL) |
| 146 | NTSTATUS TerminateProcess(HANDLE hProcess, NTSTATUS ExitStatus) { |
nothing calls this directly
no test coverage detected