gai_strerrorA function

The gai_strerror function assists in printing error messages based on the EAI_* errors returned by the getaddrinfo function. Note that the gai_strerror function is not thread safe, and therefore, use of traditional Windows Sockets functions such as the WSAGetLastError function is recommended.

Syntax

char * gai_strerrorA(
  int ecode
);

Parameters

ecode

Error code from the list of available getaddrinfo error codes. For a complete listing of error codes, see the getaddrinfo function.

Return Value

None

Remarks

If the ecode parameter is not an error code value that getaddrinfo returns, the gai_strerror function returns a pointer to a string that indicates an unknown error.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header ws2tcpip.h

See Also

WSAGetLastError

Winsock Functions

Winsock Reference

getaddrinfo