🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Getting IP Adress

#13714
From: Remy Lebeau (TeamB)
Date: Fri, 19 Sep 2003 06:52
14 lines
1449 bytes
"Andreas Osswald" <no.valid@email.adress.de> wrote in message
news:3f6aa66f$1@newsgroups.borland.com...

> Is it possible to get the IP adress from the own PC e.g.
> as showed with ipconfig ?

Look at the WinSock API functions gethostname() and gethostbyname().  The
returned hostent structure will contain all of the IP addresses for the
machine.  The IPs are returned in network byte order.  If you need the IPs
in dotted format, you can pass them to the inet_ntoa() function.


Gambit
Technical Details
Message-ID: <3f6aa781$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3f6aa66f$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,e6c240f3a3c6ca6d
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-09-19 00:02:16 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f6aa66f$1@newsgroups.borland.com>
Subject: Re: Getting IP Adress
Date: Thu, 18 Sep 2003 23:52:49 -0700
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 207.175.226.26
Message-ID: <3f6aa781$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1063954305 207.175.226.26 (18 Sep 2003 23:51:45 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.media.kyoto-u.ac.jp!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail