INT
WSHStringToAddress(
IN LPWSTR AddressString,
IN DWORD AddressFamily,
IN LPWSAPROTOCOL_INFOW ProtocolInfo OPTIONAL,
OUT LPSOCKADDR Address,
IN OUT LPDWORD AddressStringLength
);
WSHStringToAddress converts a logical string representation of a socket address into a SOCKADDR structure.
WSHStringToAddress returns zero if the function successfuly translated the given string into a SOCKADDR structure. Otherwise, WSHStringToAddress returns one of the following:
WSHStringToAddress should make a best-effort attempt to convert any missing components of the supplied address string. For example, a missing port number could be interpreted as being a zero for certain protocols. If WSHStringToAddress cannot make a reasonable translation of the string, it returns WSAEINVAL.