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 18:59:11

Thank you Gambit. Unfortunately it still shows "0.0.0.0". I have tested the
application in two other computers just in case. All the computers are
running XP SP2. Does it make any difference if the target application is a
VCL.NET ? Is there a patch that I need to installed? I'm using Indy10 that
ships with BDS2006. I have installed update 2 of BDS2006.

Regards,

Roberto

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:451b0c44$1@newsgroups.borland.com...
>
> "Roberto Meneghini" <rmeneghini@separationsystems.com> wrote in message
> news:451adee5$1@newsgroups.borland.com...
>
>>    Item.Caption(GStack.LocalAddresses.Strings[0]);
>
> Caption is a property, not a function.
>
> Every time you access the LocalAddress or LocalAddresses property, the
> list
> is re-populated, so you should only access the property once, not over and
> over.  Also, every time your loop is adding a new ListView item, it is
> always assigning the first address in the list as the Caption instead of
> using the current address from the loop.
>
> Use this code instead:
>
>    var
>        I: Integer;
>        Item: TListItem;
>        Addresses: TIdStrings;
>    begin
>        lvLog.Items.BeginUpdate;
>        try
>            Addresses := GStack.LocalAddresses;
>            for I := 0 to Pred(Addresses.Count) do
>            begin
>                Item := lvLog.Items.Add;
>                Item.Caption := Addresses[I];
>            end;
>        finally
>            lvLog.Items.EndUpdate;
>        end;
>    end;
>
>> As I mentioned the only INDY10 component that I've
>> dropped on my form is "TIdTCPServer".
>
> Using any Indy component will initialize GStack at runtime.
>
>> It is listening at port 500 and it is active.
>
> That has no effect whatsoever on GStack's ability to get the local
> addresses.
>
>
> Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive