Can someone give me an example of using gethostbyaddr to convert and IP to a hostname then display it in a messagebox.
I have done this to convert a hostname to an IP:
h = gethostbyname("modem-537.****covered_lol");
MessageBox(hWnd, inet_ntoa(*((struct in_addr *)h->h_addr)), "IP Address", NULL);
This works fine and converts the hostname to an IP.
But i cant work out how to do it the other way round, and convert an IP to a hostname.
Thanks in advance