You can retrieve IP and DNS addresses (as determined by WinSock) using the following functions:
Retrieve the IP and DNS information by calling NPKIGetServerIPAndDNSInfo, which returns the number of IP addresses.
To retrieve each of the IP addresses, call NPKIGetServerIPAddress to return the IP address and the number of DNS names associated with that address.
To retrieve each of the DNS names associated with the previously retrieved IP address, call NPKIGetServerDNSName.
For a sample implementation of this task, see GetIPandDNSInfo.