Re: [twsocket] WSocket DNSLookup.

2006-01-05 Thread Wilfried Mestdagh
Hello Ja,

 Program check list of domains with several components at once...
 putting something in woudldnt do the job.

Yes it does (not tested):

procedure TForm1.LookupBtnClick(Sender: TObject);
var
  Sock: TWSocket;
  n: integer;
bgein
  n := 0;
  while n  DomainList.Count do begin
Sock := TWSocket.Create(nil);
Sock.OnDnsLookupDone := SockDnsLookupDone;
Sock.Addr := DomainList[n];
Sock.DnsLookup(Sock.Addr);
Inc(n);
  end;
end;

procedure SockDnsLookupDone(Sender: TObject; Error: Word);
var
  Sock: TWSocket;
begin
  Sock := TWSocket(Sender);
  if ErrCode = 0 then
Memo1.Lines.AddStrings(Sock.DnsResultList + ' ' + Sock.Addr)
  else
Memo1.Lines.Add('Error ' + Sock.Addr + ' ' + WSocketErrorDesc(ErrCode))
  Sock.Release;
end;

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] WSocket DNSLookup.

2006-01-04 Thread Arno Garrels
Wilfried,

Not sure, but I think he meant this one:

procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; ErrCode: Word);
begin
if ErrCode = 0 then
Memo1.Lines.AddStrings(TWSocket(Sender).DnsResultList)
else if ErrCode = 1 then
Memo1.Lines.Add('Error: ' + WSocketErrorDesc(ErrCode))
else
Memo1.Lines.Add('Unknown Error!');
end;

procedure TForm1.ButtonOKClick(Sender: TObject);
begin
WSocket1.DnsLookup('www.adomain.com');
end;


 Hello Ja,
 
 I think what you wants is the TDnsQuery component (also in ICS package).
 WSocket.DNSLookup resolve a hostname to IP address.




 
 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz
 
 Tuesday, January 3, 2006, 22:18, Ja wrote:
 
 
  Wiadomosc Oryginalna 
 Od: Wilfried Mestdagh [EMAIL PROTECTED]
 Do: ICS support mailing twsocket@elists.org
 Data: Tue, 3 Jan 2006 22:00:48 +0100
 Temat: Re: [twsocket] WSocket DNSLookup.
 
 Hello Ja,
 
 Is there any way to do a WSocket DNSLookup and OnLookupDone get
 adress of host that have been looked up?
 
 I do not understeand the question. CAn you please rephrase it ?
 
 
 I wouldlike to lookup some hosts ( with WSocket.DnsLookup($domain) )
 , and at the end add a results to memo, but... when there is no
 result (for example domain doesnt exist) i would like to add text
 $domain doesnt exist! ... but have no idea how do i get $domain
 string in OnLookupDone event...
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] WSocket DNSLookup.

2006-01-04 Thread Ja
Yes i meant that but... if the error occures i need to know with 
what domain.

 procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; ErrCode: 
Word);
 begin
 if ErrCode = 0 then
 Memo1.Lines.AddStrings(TWSocket(Sender).DnsResultList)
 else
 Memo1.Lines.Add('DOMAIN_NAME: Unknown Error!');
 end;

But dont know how to get the domain_name that just have been looked 
up. TWSocket(Sender).addr is empty.


 Wiadomość Oryginalna 
Od: Arno Garrels [EMAIL PROTECTED]
Do: ICS support mailing twsocket@elists.org
Data: Wed, 4 Jan 2006 16:11:29 +0100
Temat: Re: [twsocket] WSocket DNSLookup.

 Wilfried,
 
 Not sure, but I think he meant this one:
 
 procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; ErrCode: 
Word);
 begin
 if ErrCode = 0 then
 Memo1.Lines.AddStrings(TWSocket(Sender).DnsResultList)
 else if ErrCode = 1 then
 Memo1.Lines.Add('Error: ' + WSocketErrorDesc(ErrCode))
 else
 Memo1.Lines.Add('Unknown Error!');
 end;
 
 procedure TForm1.ButtonOKClick(Sender: TObject);
 begin
 WSocket1.DnsLookup('www.adomain.com');
 end;
 
 
  Hello Ja,
  
  I think what you wants is the TDnsQuery component (also in ICS 
package).
  WSocket.DNSLookup resolve a hostname to IP address.
 
 
 
 
  
  ---
  Rgds, Wilfried [TeamICS]
  http://www.overbyte.be/eng/overbyte/teamics.html
  http://www.mestdagh.biz
  
  Tuesday, January 3, 2006, 22:18, Ja wrote:
  
  
   Wiadomosc Oryginalna 
  Od: Wilfried Mestdagh [EMAIL PROTECTED]
  Do: ICS support mailing twsocket@elists.org
  Data: Tue, 3 Jan 2006 22:00:48 +0100
  Temat: Re: [twsocket] WSocket DNSLookup.
  
  Hello Ja,
  
  Is there any way to do a WSocket DNSLookup and OnLookupDone 
get
  adress of host that have been looked up?
  
  I do not understeand the question. CAn you please rephrase it 
?
  
  
  I wouldlike to lookup some hosts ( with WSocket.
DnsLookup($domain) )
  , and at the end add a results to memo, but... when there is no
  result (for example domain doesnt exist) i would like to add 
text
  $domain doesnt exist! ... but have no idea how do i get 
$domain
  string in OnLookupDone event...
 -- 
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://www.elists.org/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be
 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] WSocket DNSLookup.

2006-01-04 Thread Arno Garrels
Ja wrote:
 Yes i meant that but... if the error occures i need to know with
 what domain.
 
 procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; ErrCode: Word);
 begin
 if ErrCode = 0 then
 Memo1.Lines.AddStrings(TWSocket(Sender).DnsResultList)
 else
 Memo1.Lines.Add('DOMAIN_NAME: Unknown Error!');
 end;
 
 But dont know how to get the domain_name that just have been looked
 up. TWSocket(Sender).addr is empty.

Why don't you put something in?

---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html

 
 
  Wiadomosc Oryginalna 
 Od: Arno Garrels [EMAIL PROTECTED]
 Do: ICS support mailing twsocket@elists.org
 Data: Wed, 4 Jan 2006 16:11:29 +0100
 Temat: Re: [twsocket] WSocket DNSLookup.
 
 Wilfried,
 
 Not sure, but I think he meant this one:
 
 procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; ErrCode: Word);
 begin
 if ErrCode = 0 then
 Memo1.Lines.AddStrings(TWSocket(Sender).DnsResultList)
 else if ErrCode = 1 then
 Memo1.Lines.Add('Error: ' + WSocketErrorDesc(ErrCode))
 else
 Memo1.Lines.Add('Unknown Error!');
 end;
 
 procedure TForm1.ButtonOKClick(Sender: TObject);
 begin
 WSocket1.DnsLookup('www.adomain.com');
 end;
 
 
 Hello Ja,
 
 I think what you wants is the TDnsQuery component (also in ICS package).
 WSocket.DNSLookup resolve a hostname to IP address.
 
 
 
 
 
 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz
 
 Tuesday, January 3, 2006, 22:18, Ja wrote:
 
 
  Wiadomosc Oryginalna 
 Od: Wilfried Mestdagh [EMAIL PROTECTED]
 Do: ICS support mailing twsocket@elists.org
 Data: Tue, 3 Jan 2006 22:00:48 +0100
 Temat: Re: [twsocket] WSocket DNSLookup.
 
 Hello Ja,
 
 Is there any way to do a WSocket DNSLookup and OnLookupDone
 get
 adress of host that have been looked up?
 
 I do not understeand the question. CAn you please rephrase it
 ?
 
 
 I wouldlike to lookup some hosts ( with WSocket. DnsLookup($domain) )
 , and at the end add a results to memo, but... when there is no
 result (for example domain doesnt exist) i would like to add
 text
 $domain doesnt exist! ... but have no idea how do i get
 $domain
 string in OnLookupDone event...
 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://www.elists.org/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] WSocket DNSLookup.

2006-01-04 Thread Wilfried Mestdagh
Hello Ja,

 But dont know how to get the domain_name that just have been looked
 up. TWSocket(Sender).addr is empty.

Sorry I mistundertood your question. Thanks Arno for clarifying.
TWSocket.Addr is not used for the DNSLookup, so you can put the domain
in there.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Wednesday, January 4, 2006, 16:21, Ja wrote:

 Yes i meant that but... if the error occures i need to know with 
 what domain.

 procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; ErrCode: 
 Word);
 begin
 if ErrCode = 0 then
 Memo1.Lines.AddStrings(TWSocket(Sender).DnsResultList)
 else
 Memo1.Lines.Add('DOMAIN_NAME: Unknown Error!');
 end;

 But dont know how to get the domain_name that just have been looked 
 up. TWSocket(Sender).addr is empty.


  Wiadomość Oryginalna 
 Od: Arno Garrels [EMAIL PROTECTED]
 Do: ICS support mailing twsocket@elists.org
 Data: Wed, 4 Jan 2006 16:11:29 +0100
 Temat: Re: [twsocket] WSocket DNSLookup.

 Wilfried,
 
 Not sure, but I think he meant this one:
 
 procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; ErrCode: 
 Word);
 begin
 if ErrCode = 0 then
 Memo1.Lines.AddStrings(TWSocket(Sender).DnsResultList)
 else if ErrCode = 1 then
 Memo1.Lines.Add('Error: ' + WSocketErrorDesc(ErrCode))
 else
 Memo1.Lines.Add('Unknown Error!');
 end;
 
 procedure TForm1.ButtonOKClick(Sender: TObject);
 begin
 WSocket1.DnsLookup('www.adomain.com');
 end;
 
 
  Hello Ja,
  
  I think what you wants is the TDnsQuery component (also in ICS 
 package).
  WSocket.DNSLookup resolve a hostname to IP address.
 
 
 
 
  
  ---
  Rgds, Wilfried [TeamICS]
  http://www.overbyte.be/eng/overbyte/teamics.html
  http://www.mestdagh.biz
  
  Tuesday, January 3, 2006, 22:18, Ja wrote:
  
  
   Wiadomosc Oryginalna 
  Od: Wilfried Mestdagh [EMAIL PROTECTED]
  Do: ICS support mailing twsocket@elists.org
  Data: Tue, 3 Jan 2006 22:00:48 +0100
  Temat: Re: [twsocket] WSocket DNSLookup.
  
  Hello Ja,
  
  Is there any way to do a WSocket DNSLookup and OnLookupDone 
 get
  adress of host that have been looked up?
  
  I do not understeand the question. CAn you please rephrase it 
 ?
  
  
  I wouldlike to lookup some hosts ( with WSocket.
 DnsLookup($domain) )
  , and at the end add a results to memo, but... when there is no
  result (for example domain doesnt exist) i would like to add 
 text
  $domain doesnt exist! ... but have no idea how do i get 
 $domain
  string in OnLookupDone event...
 -- 
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://www.elists.org/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be
 


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] WSocket DNSLookup.

2006-01-04 Thread Ja
Program check list of domains with several components at once... 
putting something in woudldnt do the job.

 Wiadomość Oryginalna 
Od: Arno Garrels [EMAIL PROTECTED]
Do: ICS support mailing twsocket@elists.org
Data: Wed, 4 Jan 2006 16:38:51 +0100
Temat: Re: [twsocket] WSocket DNSLookup.

 Ja wrote:
  Yes i meant that but... if the error occures i need to know with
  what domain.
  
  procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; 
ErrCode: Word);
  begin
  if ErrCode = 0 then
  Memo1.Lines.AddStrings(TWSocket(Sender).DnsResultList)
  else
  Memo1.Lines.Add('DOMAIN_NAME: Unknown Error!');
  end;
  
  But dont know how to get the domain_name that just have been 
looked
  up. TWSocket(Sender).addr is empty.
 
 Why don't you put something in?
 
 ---
 Arno Garrels [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 
  
  
   Wiadomosc Oryginalna 
  Od: Arno Garrels [EMAIL PROTECTED]
  Do: ICS support mailing twsocket@elists.org
  Data: Wed, 4 Jan 2006 16:11:29 +0100
  Temat: Re: [twsocket] WSocket DNSLookup.
  
  Wilfried,
  
  Not sure, but I think he meant this one:
  
  procedure TForm1.WSocket1DnsLookupDone(Sender: TObject; 
ErrCode: Word);
  begin
  if ErrCode = 0 then
  Memo1.Lines.AddStrings(TWSocket(Sender).DnsResultList)
  else if ErrCode = 1 then
  Memo1.Lines.Add('Error: ' + WSocketErrorDesc(ErrCode))
  else
  Memo1.Lines.Add('Unknown Error!');
  end;
  
  procedure TForm1.ButtonOKClick(Sender: TObject);
  begin
  WSocket1.DnsLookup('www.adomain.com');
  end;
  
  
  Hello Ja,
  
  I think what you wants is the TDnsQuery component (also in ICS 
package).
  WSocket.DNSLookup resolve a hostname to IP address.
  
  
  
  
  
  ---
  Rgds, Wilfried [TeamICS]
  http://www.overbyte.be/eng/overbyte/teamics.html
  http://www.mestdagh.biz
  
  Tuesday, January 3, 2006, 22:18, Ja wrote:
  
  
   Wiadomosc Oryginalna 
  Od: Wilfried Mestdagh [EMAIL PROTECTED]
  Do: ICS support mailing twsocket@elists.org
  Data: Tue, 3 Jan 2006 22:00:48 +0100
  Temat: Re: [twsocket] WSocket DNSLookup.
  
  Hello Ja,
  
  Is there any way to do a WSocket DNSLookup and OnLookupDone
  get
  adress of host that have been looked up?
  
  I do not understeand the question. CAn you please rephrase 
it
  ?
  
  
  I wouldlike to lookup some hosts ( with WSocket. 
DnsLookup($domain) )
  , and at the end add a results to memo, but... when there is 
no
  result (for example domain doesnt exist) i would like to add
  text
  $domain doesnt exist! ... but have no idea how do i get
  $domain
  string in OnLookupDone event...
  --
  To unsubscribe or change your settings for TWSocket mailing 
list
  please goto http://www.elists.org/mailman/listinfo/twsocket
  Visit our website at http://www.overbyte.be
 -- 
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://www.elists.org/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be
 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] WSocket DNSLookup.

2006-01-03 Thread Ja
Is there any way to do a WSocket DNSLookup and OnLookupDone get 
adress of host that have been looked up?
Thanx

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be