Article View: borland.public.cppbuilder.nativeapi
Article #9750Re: network serial number
From: Bob Gonder
Date: Sun, 13 Jun 2004 23:51
Date: Sun, 13 Jun 2004 23:51
26 lines
1947 bytes
1947 bytes
Emmanuel wrote:
>when I test it, I find a little problem in the method 2 & 3
>in http://bdn.borland.com/article/0,1410,26040,00.html,
>
>Method 2- COM CUID API
>I find that it return many different results not a unique number and none of
>them is my MAC address,
>why method 2 not suitable for my case?
Did you not read the comments above the code?
<quote>
I provide this method mostly as an example of what not to do. You may
end up with you MAC address this way, but chances are you'll just end
up with some random hex values.
</quote>
>Method 3-Using the SNMP Extension API
>I find that there is a little typing mistake
>AsnObjectIdentifier MIB_ifMACEntAddr = { sizeof(OID_ipMACEntAddr)
>sizeof(UINT), OID_ipMACEntAddr };
>
>it shoud be +,- *,/ between sizeof(OID_ipMACEntAddr) sizeof(UINT)
supposed to be number of ints, so would be
sizeof(array) / sizeof(element)
Technical Details
Message-ID:
<ijppc0lqdmhsq07e947mkmp7liqlr0b8vj@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40b1b974$1@newsgroups.borland.com> <40b30451@newsgroups.borland.com> <40cc8f41$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,d0c8dbfe3b2a0209 X-Google-Attributes: gid10cc67,public From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: network serial number Date: Sun, 13 Jun 2004 16:51:46 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <ijppc0lqdmhsq07e947mkmp7liqlr0b8vj@4ax.com> References: <40b1b974$1@newsgroups.borland.com> <40b30451@newsgroups.borland.com> <40cc8f41$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 65.173.66.53 X-Trace: newsgroups.borland.com 1087170706 65.173.66.53 (13 Jun 2004 16:51:46 -0700) Lines: 28 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail