🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #4589

Re: GStack->WSGetHostByAddr(sIP)) on Win2000

#4589
From: Zoetjuh
Date: Sat, 15 Jan 2005 14:44
41 lines
2010 bytes
"James" <jb9@btinternet.com> wrote in message 
news:41e92164@newsgroups.borland.com...
> That should be:
>
>  sIP = AThread->Connection->Socket->Binding->PeerIP;
>
> D'oh! Sorry!
>
> - JamesB
>
>
> "James" <jb9@btinternet.com> wrote in message 
> news:41e920eb$1@newsgroups.borland.com...
>> Hello!
>>
>> I'm using Indy9 and BCB6 Enterprise, and I'm trying to get the name of the 
>> computer that's connected. In the OnConnect event of TIdTCPServer, I've the 
>> following code:
>>
>>  sIP = pAThread->Connection->Socket->Binding->PeerIP;
>>  sCompName = GStack->WSGetHostByAddr(sIP);
>>
>> This works fine on all the machines I've tried it on - except a Windows 2000 
>> computer, where an exception is thrown during WSGetHostByAddr(). Has anyone 
>> any idea about what would cause this call to fail, and what I can do about 
>> it?
>>
>> I've checked the sIP variable, and it is correct; but WSGetHostByAddr() still 
>> fails.
>>
>> Thanks,
>>
>> - James
>>
>>
>>
>
>

What SP Level is the 2000 Machine running? 
Technical Details
Message-ID: <41e92c56@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <41e920eb$1@newsgroups.borland.com> <41e92164@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,d9fc8064c62c70f0
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Zoetjuh" <peter@i-hate-spam.zoetjuh.demon.nl>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <41e920eb$1@newsgroups.borland.com> <41e92164@newsgroups.borland.com>
Subject: Re: GStack->WSGetHostByAddr(sIP)) on Win2000
Date: Sat, 15 Jan 2005 15:44:38 +0100
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
NNTP-Posting-Host: 82.161.4.111
Message-ID: <41e92c56@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1105800278 82.161.4.111 (15 Jan 2005 06:44:38 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail