domain name from IP address

does anyone know how to retrieve domain name from an IP address? I know it is possible since I have seen it happening in an application? I want to know the windows API or any other method which can return me domain name of which this IP address is part?
[253 byte] By [john_avi] at [2007-11-20 11:48:13]
# 1 Re: domain name from IP address
Try this shell command:

ping -a 64.233.167.98

returns GOOGLE.COM
dglienna at 2007-11-9 13:55:43 >
# 2 Re: domain name from IP address
but how I will use it in my program I am working with MFC...can you tell me some win32 API...
john_avi at 2007-11-9 13:56:44 >
# 3 Re: domain name from IP address
Maybe you can use DnsQuery API.
I'm sorry i can't give some advise since i never use this API.
henky@nok.co.id at 2007-11-9 13:57:54 >