🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: unique identifier of your computer

#16046
From: Mike Collins
Date: Sun, 01 Jun 2003 23:41
48 lines
2617 bytes
The original thread stated that he wanted to generate a unique ID - a GUID
is unique!!  A GUID is also unique to the machine that it is generated on
(as far as I know).  I know that this isn't much use with regard to security
but my point was that it's unique.  I did follow the suggestion by pointing
out that he could use a system of concatenating together certain hardware
specific ID's


"Eudy Silva" <eudy@directnet.com> wrote in message
news:3ED95720.70406@directnet.com...
> Hi Mike,
>
> I don't get it. What kind of uniqueness will be
> achieved by using a GUID? I mean, how is this going
> to be used for protection since the calculated
> value is system independent?
>
> Eudy
>
> Mike Collins wrote:
> > Hi Mike,
> >
> > We do exactly the same thing!  I found the easiest way to generate a
unique
> > ID is to create a new GUID using the CoCreateGuid function, thus:
> >
> >    AnsiString szGUID = NULL;
> >    GUID guid;
> >    if (CoCreateGuid(&guid)==S_OK)
> >    {
> >       OLECHAR cBuff[50];
> >       ZeroMemory(cBuff, sizeof(cBuff));
> >       if ((StringFromGUID2(guid, cBuff, 50))==(MAX_GUID_SIZE+1))
> >       {
> >          szGUID = AnsiString(cBuff);
> >       }
> >    }
> >
> > Alternatively, you could concatenate together several other pieces of
> > information which is specific to the target PC i.e. Computer Name,
Domain
> > Name, MAC address, IP address etc.
> >
> > HTH
> >
> > Mike C
>
>
Technical Details
Message-ID: <3eda8e28@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!wn14feed!wn13feed!wn12feed!worldnet.att.net!216.166.71.14!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3ed8d2c9$1@newsgroups.borland.com> <3ed92560$1@newsgroups.borland.com> <3ED95720.70406@directnet.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,e96c6a7e8e688897
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-06-01 16:39:47 PST
Reply-To: "Mike Collins" <mikec@kr8.co.uk>
From: "Mike Collins" <mikec@kr8.co.uk>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3ed8d2c9$1@newsgroups.borland.com> <3ed92560$1@newsgroups.borland.com> <3ED95720.70406@directnet.com>
Subject: Re: unique identifier of your computer
Date: Mon, 2 Jun 2003 00:41:26 +0100
Lines: 50
Organization: kr8
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 81.2.78.34
Message-ID: <3eda8e28@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1054510632 81.2.78.34 (1 Jun 2003 16:37:12 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!wn14feed!wn13feed!wn12feed!worldnet.att.net!216.166.71.14!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail