Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Sep : Re: GStack

www.cryer.info
Managed Newsgroup Archive

Re: GStack

Subject:Re: GStack
Posted by:"Roberto Meneghini" (rmeneghi..@separationsystems.com)
Date:Wed, 27 Sep 2006 20:46:12

That solved the problem. I used
System.Net.Dns.GetHostByName(GStack.HostName).AddressList and was able to
list the IP address of the adapters.

Thanks for pointing me into the right direction,

Roberto


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:451b1e98$1@newsgroups.borland.com...
>
> "Roberto Meneghini" <rmeneghini@separationsystems.com> wrote in message
> news:451b104e@newsgroups.borland.com...
>
>> Does it make any difference if the target application is a VCL.NET ?
>
> Yes, that would make all of the difference.
>
> Under .NET, Indy uses the TIdStackDotNet class.  The
> TIdStackDotNet.PopulateLocalAddresses() method calls the
> System.Net.Dns.GetHostByAddress() method to get the address list.
>
> However, it is passing the System.Net.IPAddress.Any property as the
> address
> for GetHostByAddress() to resolve.  IPAddress.Any is the same as
> '0.0.0.0'.
> I do not know if GetHostByAddress('0.0.0.0') is valid in .NET, but it is
> certainly not valid in Win32 and Linux.  Under Win32 and Linux, Indy uses
> the socket API gethostname() and gethostbyname() functions instead.  Why
> Indy is not using System.Net.Dns.GetHostName() and
> System.Net.Dns.GetHostByName() under .NET, I do not know.
>
>
> Gambit

Replies:

none

In response to:

www.cryer.info
Managed Newsgroup Archive