Compartir a través de


WSHAddressToString function

[ This function is obsolete for Windows Server 2003, Windows Vista, and later, and is no longer supported. ]

The WSHAddressToString function returns a logical string representation of a socket address that is generally used for display purposes.

Syntax

INT WSHAddressToString(
  _In_     WSHAddressToString  Address,
  _In_     INT                 AddressLength,
  _In_opt_ LPWSAPROTOCOL_INFOW ProtocolInfo,
  _Out_    LPWSTR              AddressString,
  _Inout_  LPDWORD             AddressStringLength
);

Parameters

  • Address [in]
    Pointer to a SOCKADDR to convert.

  • AddressLength [in]
    Specifies the number of bytes at Address.

  • ProtocolInfo [in, optional]
    Pointer to a WSAPROTOCOL_INFOW structure passed in a user-mode call to WSAAddressToString, or is NULL.

  • AddressString [out]
    Pointer to a caller-provided buffer into which the helper DLL should copy the logical string representation of the address.

  • AddressStringLength [in, out]
    On input, points to a variable that specifies the length in bytes of the buffer provided at AddressString. The helper DLL should reset the value to the number of characters that it actually copied into the buffer at AddressString before it returns control.

Return value

WSHAddressToString either returns zero to indicate success or one of the following:

Return code Description
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.

 

Requirements

Target platform

Desktop

Header

Wsahelp.h (include Wsahelp.h)

See also

WSHStringToAddress

 

 

Send comments about this topic to Microsoft