Hello Steve,
> to be a pain. I need to get the Host IP from a domain name, IE -
> www.skpontiac.com to 12.163.44.20
I don't know how it is done in Indy. But in ICS it is as simple as
dropping a TWSocket on the form and writing a few lines.
procedure TForm1.Button1Click(Sender: TObject);
begin
WSocket1.OnDnsLookupDone := WSocket1DnsLookupDone;
WSocket1.DnsLookup('www.skpontiac.com');
end;
procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; ErrCode: Word);
begin
if ErrCode = 0 then
Memo1.Lines.AddStrings(WSocket1.DnsResultList)
else
Memo1.Lines.Add(WSocket.WSocketErrorDesc(ErrCode))
end;
The ICS (Internet Component Suite, freeware) is available on the
partner CD or downloadable here http://www.overbyte.be.
Arno Garrels
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi