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
);

Parameter

  • ecode [in]
    Error code from the list of available getaddrinfo error codes. For a complete listing of error codes, see the getaddrinfo function.

Hinweise

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.

Anforderungen

Mindestens unterstützter Client

Windows 2000 Professional

Mindestens unterstützter Server

Windows 2000 Server

Header

Ws2tcpip.h; Wspiapi.h on Windows 2000

Unicode- und ANSI-Namen

gai_strerrorW (Unicode) and gai_strerrorA (ANSI)

Siehe auch

Winsock Reference

Winsock Functions

getaddrinfo

WSAGetLastError