You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many WSA functions call WSASetLastError as a means of returning error information.
I believe WSASet/GetLastError is simply an alias of the regular Set/GetLastError therefore it would make sense that WSA functions be marked as SetLastError = true.
Many thanks
The text was updated successfully, but these errors were encountered:
Aye, see also WSAWaitForMultipleEvents, WSASetEvent and probably others too. On the one hand it's possible they'd want to reserve the right to change it again the future. On the other hand I wouldn't be surprised if people have come to rely on it.
For those interested, I dug through some very old documentation and here are some clarifying details:
The use of the WSAGetLastError() function to retrieve the last error code, rather than relying on a global error variable (cf. errno), is required in order to provide compatibility with future multi-threaded environments.
Note that in a Win16 environment WSAGetLastError() is used to retrieve only Windows Sockets API errors. In a Win32 environment, WSAGetLastError() will invoke GetLastError(), which is used to retrieve the error status for all Win32 API functions on a per-thread basis. For portability, an application should use WSAGetLastError() immediately after the Windows Sockets API function which failed.
Hello,
Many WSA functions call WSASetLastError as a means of returning error information.
I believe WSASet/GetLastError is simply an alias of the regular Set/GetLastError therefore it would make sense that WSA functions be marked as SetLastError = true.
Many thanks
The text was updated successfully, but these errors were encountered: