In order to support IPv6, code should use the newer Winsock API calls that are version independent. The primary call is getaddrinfo(), which is available on Windows Vista and Windows 7. This code demonstrates the use of this call as well as inet_ntop()