Re: [twsocket] TDNSQuery problem...

2006-01-06 Thread Fastream Technologies
Hello,

Did you try this:

TDNSQuery(sender).Release; ?

Regards,

SZ

- Original Message - 
From: Ja [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Friday, January 06, 2006 1:17 PM
Subject: [twsocket] TDNSQuery problem...


 Hi.
 I'm trying to make application that could get information about 
 hosts simultanously for lets say... 10 hosts... I made something 
 like this:
 
 -
 
 var newsocket:TDnsQuery;
domain:string;
 
 begin
  newsocket:=TDNSQuery.Create(self);
  newsocket.Addr:='195.117.102.3';
  newsocket.Proto:='tcp';
  newsocket.Port:='53';
  newsocket.OnRequestDone:=DnsQuery1RequestDone;
  readln(plik,domain);
  newsocket.ALookup(domain);
 end;
 
 end;
 
 --
 
 But when im putting in RequestDone:
 TDNSQuery(sender).Destroy; access violation occures. Why is that?
 
 Thank you for your help!
 Ann.
 
 
 
 -- 
 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] TDNSQuery problem...

2006-01-06 Thread Guillaume MAISON
Ja a écrit :
 But when im putting in RequestDone:
 TDNSQuery(sender).Destroy; access violation occures. Why is that?

instead try :
TDNSQuery(sender).Free;

But if i were you i would do it elsewhere...
Even in requestdone events or within any component event you shouldn't 
try to destroy it as it may be used after the event call...

-- 

Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com

-- 
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