GetIpErrorString function

The GetIpErrorString function retrieves an IP Helper error string.

Syntax


DWORD GetIpErrorString(
  _In_    IP_STATUS ErrorCode,
  _Out_   PWCHAR    Buffer,
  _Inout_ PDWORD    Size
);

Parameters

ErrorCode [in]

The error code to be retrieved. The possible values for this parameter are defined in the Ipexport.h header file.

Buffer [out]

A pointer to the buffer that contains the error code string if the function returns with NO_ERROR.

Size [in, out]

A pointer to a DWORD that specifies the length, in bytes, of the buffer pointed to by Buffer parameter.

Return value

Returns NO_ERROR upon success.

If the function fails, use FormatMessage to obtain the message string for the returned error.

Remarks

The GetIpErrorString function can be used to retrieve an IP Helper error string for an IP error code. The IP_STATUS error code passed in the ErrorCode parameter is returned in the Status member of the ICMP_ECHO_REPLY, ICMP_ECHO_REPLY32, and ICMPV6_ECHO_REPLY structures used by the ICMP and ICMPv6 functions. The functions that use these structures include Icmp6ParseReplies, Icmp6SendEcho2, IcmpParseReplies, IcmpSendEcho, IcmpSendEcho2, and IcmpSendEcho2Ex.

The syntax for the GetIpErrorString function was slightly changed on the Microsoft Windows Software Development Kit (SDK) released for Windows Vista and later. The data type for the Buffer parameter was changed from PWCHAR to PWSTR.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Iphlpapi.h

Library

Iphlpapi.lib

DLL

Iphlpapi.dll

See also

ICMP_ECHO_REPLY
ICMP_ECHO_REPLY32
ICMPV6_ECHO_REPLY
Icmp6ParseReplies
Icmp6SendEcho2
IcmpParseReplies
IcmpSendEcho
IcmpSendEcho2
IcmpSendEcho2Ex
IP Helper Start Page
IP Helper Function Reference

 

 

Show: