Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

gai_strerror 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_strerror(
  _In_ int ecode
);

Parameters

ecode [in]

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

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]

Header

Ws2tcpip.h;
Wspiapi.h on Windows 2000

Unicode and ANSI names

gai_strerrorW (Unicode) and gai_strerrorA (ANSI)

See also

Winsock Reference
Winsock Functions
getaddrinfo
WSAGetLastError

 

 

Show:
© 2017 Microsoft