SetLastError function kernel32

void SetLastError(
  1. WIN32_ERROR dwErrCode
)

Sets the last-error code for the calling thread.

To learn more, see learn.microsoft.com/windows/win32/api/errhandlingapi/nf-errhandlingapi-setlasterror.

Implementation

@pragma('vm:prefer-inline')
void SetLastError(WIN32_ERROR dwErrCode) => _SetLastError(dwErrCode);