Article View: borland.public.cppbuilder.internet.socket
Article #4745Re: How to get and set IP Address programmatically
From: Remy Lebeau (TeamB)
Date: Fri, 24 Dec 2004 22:21
Date: Fri, 24 Dec 2004 22:21
13 lines
1445 bytes
1445 bytes
"Hans Galema" <notused@notused.nl> wrote in message news:41cbdf55$1@newsgroups.borland.com... > You can get the IP-adress of one or all networkcards > by using gethostname() and gethostbyname(hostname) That is not the best way to do that. In fact, that approach does not allow you to specify the network adapter to query. If you want to work with specific/multiple adapters, you should use GetAdaptersInfo() instead. Gambit
Technical Details
Message-ID:
<41cc9621$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!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-mailReferences:
<41cb8251@newsgroups.borland.com> <41cbdf55$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,447b846124778889 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <41cb8251@newsgroups.borland.com> <41cbdf55$1@newsgroups.borland.com> Subject: Re: How to get and set IP Address programmatically Date: Fri, 24 Dec 2004 14:21:26 -0800 Lines: 15 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: <41cc9621$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1103926817 68.69.17.41 (24 Dec 2004 14:20:17 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!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