GetLastError function Null safety kernel32

int GetLastError ()

Retrieves the calling thread's last-error code value. The last-error code is maintained on a per-thread basis. Multiple threads do not overwrite each other's last-error code.

DWORD GetLastError();

Implementation

int GetLastError() {
  final _GetLastError = _kernel32
      .lookupFunction<Uint32 Function(), int Function()>('GetLastError');
  return _GetLastError();
}