WSAGetLastError() question
How does one go about obtaining the WSAGetLastError Code itself, not
the int value?
For example:
here is the return code: WSAHOST_NOT_FOUND
here is the return value: 11001
as indicated here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/windows_sockets_functions_2.asp
When this condition exists, I know that WSAGetLastError returns 11001,
but what construct or function can I use to get it to return
WSAHOST_NOT_FOUND.
The idea is to make the return code more intuitive. (for the cases
where the codes themselves are somewhat intuitive)
In BSD, I can call strerror(errno) to get the string associated with
errno, or in the case if dealing with certain functions such as
gethostbyname, I can call hstrerror(h_errno) to get a more intuitive
error:
Does such a function exist for windows?
Thanks in advance for any replies.
Charles
|