GetIpErrorString function (iphlpapi.h)
The GetIpErrorString function retrieves an IP Helper error string.
Syntax
IPHLPAPI_DLL_LINKAGE DWORD GetIpErrorString(
[in] IP_STATUS ErrorCode,
[out] PWSTR Buffer,
[in, out] PDWORD Size
);
Parameters
[in] ErrorCode
The error code to be retrieved. The possible values for this parameter are defined in the Ipexport.h header file.
[out] Buffer
A pointer to the buffer that contains the error code string if the function returns with NO_ERROR.
[in, out] Size
A pointer to a DWORD that specifies the length, in characters, of the buffer pointed to by Buffer parameter, excluding the terminating null (i.e. the size of Buffer in characters, minus one).
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
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | iphlpapi.h |
Library | Iphlpapi.lib |
DLL | Iphlpapi.dll |