If the function succeeds, the host name is valid and the return value
will be non-zero. If the function fails, the host name could not be resolved
to an IP address and the return value will be zero. To get extended error
information, call FtpGetLastError.
The FtpValidateHostName function provides a convenient way
to determine if a host name is valid by attempting to resolve the name
into an IP address. If the Unicode version of this function is used,
any non-ASCII characters in the host name will be automatically encoded
into a compatible format and then resolved to an IP address. If you are
unsure if an internationalized domain name will be specified as the
host name, it is recommended you use the Unicode version.
If the lpszHostName parameter specifies a valid IPv4 or
IPv6 address string instead of a host name, this function will return
a copy of that IP address in the buffer provided by the caller. This
allows the function to be used in cases where a user may input either
a host name or IP address.
If you wish to validate a complete FTP URL instead of a host name,
use the FtpValidateUrl function.