🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #4677

Re: all IP adresses of the local system

#4677
From: Remy Lebeau (TeamB)
Date: Tue, 20 Dec 2005 18:25
28 lines
1777 bytes
"Dennis Jones" <nospam@nospam.com> wrote in message
news:43a843e2@newsgroups.borland.com...

>       while (pAdapter)
>       {
>          AnsiString AdapterAddress =
> pAdapter->IpAddressList.IpAddress.String;
>       }

You have an endless loop there.  You forgot to change pAdapter on each
iteration.  Also, you are only retrieving 1 address from each adapter, but
there is potentially multiple addresses available.  Try this instead:

    while (pAdapter)
    {
        PIP_ADDR_STRING pIpAddress = &(pAdapter->IpAddressList);
        while (pIpAddress)
        {
            AnsiString AdapterAddress = pIpAddress->IpAddress.String;
            //...
            pIpAddress = pIpAddress->Next;
        }
        pAdapter = pAdapter->Next;
    }


Gambit
Technical Details
Message-ID: <43a84c2d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news-out.superfeed.net!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43a832cb$1@newsgroups.borland.com> <43a843e2@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,744a3315ee7b00aa
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <43a832cb$1@newsgroups.borland.com> <43a843e2@newsgroups.borland.com>
Subject: Re: all IP adresses of the local system
Date: Tue, 20 Dec 2005 10:25:02 -0800
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <43a84c2d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1135103021 68.69.17.41 (20 Dec 2005 10:23:41 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news-out.superfeed.net!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail