There is a function gethostbyname for getting the ip address using Winsock. This function will retrieve the ip address details into a variable of type "structure hostent". Read for more info at <a href=http://www.codersource.net/win32_socket_ip_address.html>IP Address Retrieval</a>