🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Problems getting MAC address...

#9289
From: Remy Lebeau (TeamB)
Date: Tue, 13 Jul 2004 18:59
29 lines
2113 bytes
"Daniele Borini" <borini@infinito.it> wrote in message
news:40f3bacd$5@newsgroups.borland.com...

> by using iphlpapi lib your app will not run under son MS OS like NT.

The only OS versions that don't support the IP Helper API are Win95 and NT4
prior to Service Pack 4.  Who uses Win95 anymore?  Who uses NT4 without the
latest service packs installed?  Very few nowadays, if any.  As for
GetAdaptersInfo(), it exists in NT4 but is not implemented so it would
simply return ERROR_NOT_SUPPORTED, which the code can test for.

If you are concerned about those versions, then you could always just load
the function dyanmically at run-time instead of static linking at
compile-time.  Then the program will continue to run even on those old
versions.

> i suggest you to use registry to achieve those infos.
>
> that way runs to al MS OS.

I disagree.  You should not access the Registry directly for retrieving
system info when there are functions available that already do that for you.
If you do, then you usually have to write version-specific code to access
different areas of the Registry for different versions, which is just as bad
as using unsupported functions.


Gambit
Technical Details
Message-ID: <40f430ec@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40f28d13@newsgroups.borland.com> <40f3bacd$5@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,3aa0ca650455337a
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <40f28d13@newsgroups.borland.com> <40f3bacd$5@newsgroups.borland.com>
Subject: Re: Problems getting MAC address...
Date: Tue, 13 Jul 2004 11:59:32 -0700
Lines: 31
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: <40f430ec@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1089745132 68.69.17.41 (13 Jul 2004 11:58:52 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail