Article View: borland.public.cppbuilder.internet.socket
Article #4588GStack->WSGetHostByAddr(sIP)) on Win2000
From: James
Date: Sat, 15 Jan 2005 13:55
Date: Sat, 15 Jan 2005 13:55
20 lines
1638 bytes
1638 bytes
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
Technical Details
Message-ID:
<41e920eb$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed.freenet.de!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,d9fc8064c62c70f0 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "James" <jb9@btinternet.com> Newsgroups: borland.public.cppbuilder.internet.socket Subject: GStack->WSGetHostByAddr(sIP)) on Win2000 Date: Sat, 15 Jan 2005 13:55:56 -0000 Lines: 23 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 NNTP-Posting-Host: 217.42.177.103 Message-ID: <41e920eb$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1105797355 217.42.177.103 (15 Jan 2005 05:55:55 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed.freenet.de!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail