Article View: borland.public.cppbuilder.nativeapi
Article #5086Re: IP Address of Workstation
From: Shane Stump
Date: Fri, 30 Sep 2005 21:33
Date: Fri, 30 Sep 2005 21:33
23 lines
1699 bytes
1699 bytes
Any sample code to get the first ip address in asc form (i.e. 192.168.0.1)? Regards, Shane "Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message news:433d8ee6$1@newsgroups.borland.com... > > "Shane Stump" <ShaneStumpNOSPAM@StumpWare.com> wrote in message > news:433d8a67$1@newsgroups.borland.com... > >> Does anyone have a code sample to get the ip address(s) of >> a local workstation given the workstation's name as returned >> by gethostname()? > > Pass the name to gethostbyname(). The hostent structure that is returned > will contain a list of the available IP addresses. > > > Gambit > >
Technical Details
Message-ID:
<433daec5@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!novia!newsfeed.yul.equant.net!news-out.nuthinbutnews.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<433d8a67$1@newsgroups.borland.com> <433d8ee6$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,bd4babe6e8b894e9 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Shane Stump" <ShaneStumpNOSPAM@StumpWare.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <433d8a67$1@newsgroups.borland.com> <433d8ee6$1@newsgroups.borland.com> Subject: Re: IP Address of Workstation Date: Fri, 30 Sep 2005 16:33:50 -0500 Lines: 25 Organization: StumpWare X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 66.63.248.134 Message-ID: <433daec5@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1128115909 66.63.248.134 (30 Sep 2005 14:31:49 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!novia!newsfeed.yul.equant.net!news-out.nuthinbutnews.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail