chsvlib
chsv helper source code

◆ Win32ErrorToPosixError()

errno_t Chusov::Win32ErrorToPosixError ( unsigned long  nError)
noexcept

Translates a Windows system error code to a POSIX error code. .

Parameters
[in]nErrorA Windows error code to be translated.
Returns
The function returns a POSIX code corresponding to a Windows error code. The POSIX codes that are returned are defined in the IEEE Std 1003.1-2004 and IEEE Std 1003.1-2013 standards. Also EUNKNWN code can be returned if the function cannot map the Windows error code to a valid POSIX code. A numeric value of the code returned is defined either by this header or by a system header, if it is included before the chsverr.h.
Remarks
The function is only defined if the source is compiled with defined _WIN32.