Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

nslookup in delphi

303 views
Skip to first unread message

Fernando Escobar

unread,
May 7, 1999, 3:00:00 AM5/7/99
to
hy

i am looking for a nslookup component for delphi 4.

i have an ip address (example: 158.215.420.0) and i need to know if this ip
is a valid ip (if it really exists), and resolve the hostname (example:
www.abcx.com).

anyone, here, knows any component to do this ?

thanks

FE

Stephane Grobety

unread,
May 7, 1999, 3:00:00 AM5/7/99
to
You don't need a component for that: see the GetHostByAddr API.

Good luck,
Stephane

Fernando Escobar <esc...@softrent.com.br> wrote in message
news:7gurd3$eg...@forums.borland.com...

Francois Piette

unread,
May 10, 1999, 3:00:00 AM5/10/99
to
>i have an ip address (example: 158.215.420.0) and i need to know if this ip
>is a valid ip (if it really exists), and resolve the hostname (example:
>www.abcx.com).
>
>anyone, here, knows any component to do this ?


You can easily do it using TWSocket component from freeware ICS collection
(full source code included). Simply call TWSocket.ReverseDNSLookup and wait
for resolution to be done. It will call winsock that will call DNS to
reverse resolve the IP address to a name.

If you wants to directly interrogate a DNS, you can do it you TDnsQuery ICS
component. You must query PTR record from DNS to do reverse lookup.

Download ICS source code (ICS.ZIP) from
http://www.rtfm.be/fpiette/indexuk.htm

--
francoi...@pophost.eunet.be
The freeware Internet Component Suite maker
The freeware MidWare middleware maker
Download from http://www.rtfm.be/fpiette/indexuk.htm

0 new messages