Link to home
Start Free TrialLog in
Avatar of philsmicronet
philsmicronetFlag for Australia

asked on

Retreiving the Hostname from an IP Address

I am writing a log file analyser and I want to resolve the IP address into a Hostname. How do I do this?

I will be using Visual C.
Avatar of jhance
jhance

Use the WINSOCK gethostbyaddr() or the asynchronous version WSAAsyncGetHostByAddr().
Avatar of philsmicronet

ASKER

If I have a dotted ip address (say 192.168.40.10) how to I use the gethostbyaddr function. MSDN is not very specific on how to do this.
ASKER CERTIFIED SOLUTION
Avatar of cookre
cookre
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks very much. MSDN is not very specific about this stuff