Skip to content

Latest commit

 

History

History
97 lines (72 loc) · 3.3 KB

nf-ws2tcpip-gai_strerrorw.md

File metadata and controls

97 lines (72 loc) · 3.3 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:ws2tcpip.gai_strerrorW
gai_strerrorW function (ws2tcpip.h)
The gai_strerror function assists in printing error messages based on the EAI_* errors returned by the getaddrinfo function. (Unicode)
_win32_gai_strerror_2
gai_strerror
gai_strerror function [Winsock]
gai_strerrorW
winsock.gai_strerror_2
ws2tcpip/gai_strerror
ws2tcpip/gai_strerrorW
winsock\gai_strerror_2.htm
WinSock
00b4c5de-89c9-419f-bff8-822ef0446697
12/05/2018
_win32_gai_strerror_2, gai_strerror, gai_strerror function [Winsock], gai_strerrorA, gai_strerrorW, winsock.gai_strerror_2, ws2tcpip/gai_strerror, ws2tcpip/gai_strerrorA, ws2tcpip/gai_strerrorW, wspiapi/gai_strerror, wspiapi/gai_strerrorA, wspiapi/gai_strerrorW
ws2tcpip.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
gai_strerrorW (Unicode) and gai_strerrorA (ANSI)
Windows
19H1
gai_strerrorW
ws2tcpip/gai_strerrorW
c++
APIRef
kbSyntax
HeaderDef
Ws2tcpip.h
Wspiapi.h
gai_strerror
gai_strerrorA
gai_strerrorW

gai_strerrorW function

-description

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.

-parameters

-param 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.

Note

The ws2tcpip.h header defines gai_strerror as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

-see-also

WSAGetLastError

Winsock Functions

Winsock Reference

getaddrinfo