🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Getting SubNetMask

#2726
From: Remy Lebeau (TeamB)
Date: Tue, 16 Jan 2007 18:08
20 lines
1314 bytes
"Andreas Osswald" <noname@noname.de> wrote in message
news:45ad12f0$1@newsgroups.borland.com...

> is it possible to get the subnetmask of the local PC network
adapters?

Yes.  Use the GetAdaptersInfo() function from the IP Helper API:

    GetAdaptersInfo
    http://msdn2.microsoft.com/en-us/library/aa365917.aspx

> We get the IP adresses of the local PC with the function
gethostbyname()

That is a socket API function.  The socket API does not provide subnet
information.


Gambit
Technical Details
Message-ID: <45ad1623$3@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <45ad12f0$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,66915431bfa9fcfb
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: <45ad12f0$1@newsgroups.borland.com>
Subject: Re: Getting SubNetMask
Date: Tue, 16 Jan 2007 10:08:20 -0800
Lines: 22
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: 75.83.34.171
Message-ID: <45ad1623$3@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1168971299 75.83.34.171 (16 Jan 2007 10:14:59 -0800)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail