CDnsClient::GetAddressFamily Method  
 
INT GetAddressFamily(
  LPCTSTR lpszAddress  
);

The GetAddressFamily method returns the address family for the specified IP address.

Parameters

lpszAddress
A pointer to a string which specifies an IPv4 or IPv6 address.

Return Value

If the method succeeds, the return value is DNS_ADDRESS_IPV4 if the address is in IPv4 format, or DNS_ADDRESS_IPV6 if the address is in IPv6 format. If the address string is not in a recognized format, it returns DNS_ADDRESS_UNKNOWN.

Requirements

Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header File: cstools10.h
Import Library: csdnsv10.lib
Unicode: Implemented as Unicode and ANSI versions.

See Also

DnsGetHostAddress, DnsGetHostInfo, DnsGetHostServices, DnsGetMailExchange, DnsGetRecord