[DllImport("ntdll.dll", SetLastError=true)]
static extern uint NtTerminateProcess(IntPtr hProcess, int errorStatus);
<DllImport("ntdll.dll")>
Public Shared Function NtTerminateProcess(ByVal hfandle As IntPtr, ByVal ErrorStatus As Integer) As UInteger
End Function
[DllImport("ntdll.dll", SetLastError : true)]
def NtTerminateProcess(ProcessHandle as IntPtr, ExitStatus as UInt32) as UInt32:
pass
None.
Do you know one? Please contribute it!
If not specified, caller process is killed.
Please add some!
Process process = Process.GetProcessesByName("notepad").First();
IntPtr processHandle = process.Handle;
NtTerminateProcess(processHandle, 0);