If the method succeeds, the return value is the address family
for the specified IP address and may be one of the values listed below. If the
method fails, the return value is INET_ADDRESS_UNKNOWN. To get extended error
information, call the GetLastError method.
The GetAddressFamily method returns the address family
associated with the specified IP address string. This can be used to
determine if a string specifies a valid IPv4 or IPv6 address that can
be passed to other methods such as Connect. Note that
this method will not attempt to resolve hostnames, it will only
accept IP addresses.
To determine if the local system has an IPv6 TCP/IP stack installed
and configured on the local system, use the IsProtocolAvailable
method. If an IPv6 stack is not installed, this method will fail
if the lpszAddress parameter specifies an IPv6 address, even if
the address itself is valid.