TerminateProcess function Null safety kernel32

int TerminateProcess(
  1. int hProcess,
  2. int uExitCode
)

Terminates the specified process and all of its threads.

BOOL TerminateProcess(
  HANDLE hProcess,
  UINT   uExitCode);

Implementation

int TerminateProcess(int hProcess, int uExitCode) {
  final _TerminateProcess = _kernel32.lookupFunction<
      Int32 Function(IntPtr hProcess, Uint32 uExitCode),
      int Function(int hProcess, int uExitCode)>('TerminateProcess');
  return _TerminateProcess(hProcess, uExitCode);
}