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

Reply via email to