INT
WSHAddressToString(
IN LPSOCKADDR Address,
IN INT AddressLength,
IN LPWSAPROTOCOL_INFOW ProtocolInfo OPTIONAL,
OUT LPWSTR AddressString,
IN OUT LPDWORD AddressStringLength
);
WSHAddressToString returns a logical string representation of a socket address that is generally used for display purposes.
Parameters
Address
Points to a SOCKADDR to convert.
AddressLength
Specifies the number of bytes at Address.
ProtocolInfo
Points to a WSAPROTOCOL_INFOW structure passed in a user-mode call to WSAAddressToString, or is NULL.
AddressString
Points to a caller-provided buffer into which the helper DLL should copy the logical string representation of the address.
AddressStringLength
On input, points to a variable specifying the length in bytes of the buffer provided at AddressString. On return, the helper DLL should reset the value to the number of bytes it actually copied into the buffer at AddressString.
Return Value
WSHAddressToString either returns zero to indicate success or one of the following:
WSAEFAULT
The buffer specified at AddressString is too small to copy the logical representation of the address.
WSAEINVAL
The address specified at Address is not a valid address to be translated.
See Also