GetExitCodeProcess function Null safety kernel32

int GetExitCodeProcess(
  1. int hProcess,
  2. Pointer<Uint32> lpExitCode
)

Retrieves the termination status of the specified process.

BOOL GetExitCodeProcess(
  HANDLE  hProcess,
  LPDWORD lpExitCode);

Implementation

int GetExitCodeProcess(int hProcess, Pointer<Uint32> lpExitCode) {
  final _GetExitCodeProcess = _kernel32.lookupFunction<
      Int32 Function(IntPtr hProcess, Pointer<Uint32> lpExitCode),
      int Function(
          int hProcess, Pointer<Uint32> lpExitCode)>('GetExitCodeProcess');
  return _GetExitCodeProcess(hProcess, lpExitCode);
}