Thread View: borland.public.cppbuilder.nativeapi
2 messages
2 total messages
Started by Andreas Osswald
Tue, 16 Jan 2007 18:01
Getting SubNetMask
Author: Andreas Osswald
Date: Tue, 16 Jan 2007 18:01
Date: Tue, 16 Jan 2007 18:01
9 lines
1055 bytes
1055 bytes
Hello, is it possible to get the subnetmask of the local PC network adapters? We get the IP adresses of the local PC with the function gethostbyname() additionaly we need the subnetmask but how to get it? Regards Andreas
Re: Getting SubNetMask
Author: Remy Lebeau (TeamB)
Date: Tue, 16 Jan 2007 18:08
Date: Tue, 16 Jan 2007 18:08
20 lines
1314 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads