Article View: borland.public.cppbuilder.nativeapi
Article #9703Re: serial number
From: Dave
Date: Thu, 17 Jun 2004 21:51
Date: Thu, 17 Jun 2004 21:51
37 lines
1886 bytes
1886 bytes
On Thu, 17 Jun 2004 18:23:03 +0100, john blackburn wrote:
> Fabi� wrote:
>
>> is there any component to get a serial number to identify a pc?
>
> I don't think so; Dell for one (and probably others) has a readable asset
> tag but it is proprietary.
>
> There are several things you can do, however, like register its MAC address;
> this is probably the most straight forward. Nothing will be perfect but
> this works.
another option is to get hard disk serial number.
Try
void __fastcall TForm1::GetVolumeInfo(AnsiString Volume)
{
char VolName[80];
DWORD SerialNum;
char SerialNumStr[20];
DWORD maxCompLen;
DWORD FileSysFlags;
char FileSysName[20];
if (GetVolumeInformation( Volume.c_str(), VolName, sizeof(VolName),
&SerialNum, &maxCompLen, &FileSysFlags, FileSysName,
sizeof(FileSysName))){
Memo1->Lines->Add(Volume + " " + VolName);
AnsiString a;
a.sprintf(SerialNumStr, "%08x", SerialNum);
Memo1->Lines->Add("Volume Serial Number is : " + a.UpperCase());
}
}
Hope it helps,
Dave
Technical Details
Message-ID:
<1gsnxg6vybapn.1s0cl5jy5aco5.dlg@40tude.net>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<40d1c80f$1@newsgroups.borland.com> <40d1d375@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,UTF8 X-Google-Thread: 10cc67,f57e2ee1b959f497 X-Google-Attributes: gid10cc67,public From: Dave <dave_xse@nospam.org> Subject: Re: serial number Newsgroups: borland.public.cppbuilder.nativeapi User-Agent: 40tude_Dialog/2.0.10.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit References: <40d1c80f$1@newsgroups.borland.com> <40d1d375@newsgroups.borland.com> Date: Thu, 17 Jun 2004 23:51:32 +0200 Message-ID: <1gsnxg6vybapn.1s0cl5jy5aco5.dlg@40tude.net> NNTP-Posting-Host: 80.218.152.5 X-Trace: newsgroups.borland.com 1087509101 80.218.152.5 (17 Jun 2004 14:51:41 -0700) Lines: 37 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail