GetLastError function kernel32
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() => _GetLastError();