Article View: borland.public.cppbuilder.nativeapi
Article #6372Re: Unique compuer ID
From: Renald Yazmir
Date: Fri, 20 May 2005 20:17
Date: Fri, 20 May 2005 20:17
38 lines
2316 bytes
2316 bytes
What about "GetCurrentHwProfile" and returned parameter of HW_PROFILE_INFO
szHwProfileGuid
"{12340001-4980-1920-6788-123456789012}" ?
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:428e3ff8$1@newsgroups.borland.com...
>
> "Renald Yazmir" <renald@partmaker.com> wrote in message
> news:428e3c63$1@newsgroups.borland.com...
>
>> What Windows API function can I use to get a unique compuer ID?
>
> There is no such ID associated with a computer to begin with, thus no
> function to retreive it. The closest you can get is to:
>
> 1) retreive the serial number of your hard drive(s) via
> GetVolumeInformation()
>
> 2) use inline assembly code to query the CPU for its unique ID (but this
> only works on certain Pentium chips, is not included in the latest chips
> anymore because it was too controversial, and can be disabled by the user
> in
> the BIOS).
>
> 3) generate your own unique IDs, such as via CoCreateGuid(). This
> generates
> a new GUID each time it is called. It is not stored anywhere on the
> hardware, although it may use hardware values to help ensure uniqueness.
> You are responsible for keeping track of the values you generate. If you
> lose it, it is gone.
>
>
> Gambit
>
>
Technical Details
Message-ID:
<428e45d1$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsgate.cistron.nl!skynet.be!grolier!194.74.65.66.MISMATCH!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<428e3c63$1@newsgroups.borland.com> <428e3ff8$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,a23b7d6ad8637bed X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Renald Yazmir" <renald@partmaker.com> From: "Renald Yazmir" <renald@partmaker.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <428e3c63$1@newsgroups.borland.com> <428e3ff8$1@newsgroups.borland.com> Subject: Re: Unique compuer ID Date: Fri, 20 May 2005 16:17:25 -0400 Lines: 40 Organization: IMCS Inc X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 NNTP-Posting-Host: 66.106.28.123 Message-ID: <428e45d1$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1116620241 66.106.28.123 (20 May 2005 13:17:21 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsgate.cistron.nl!skynet.be!grolier!194.74.65.66.MISMATCH!news-peer0-test!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail