Every hardisk has serial number, it will be an advantage to get this serial. Possibly I can use it to prevent my application install by twice at same hard disk.
May i get the code?

Sure, actually some application using not only serial of harddisk but also windows serial, cpu serial and network number to do some restriction.
Anyway, here the code you want:

function GetHardDiskSerial(const DriveLetter: Char): string;
NotUsed: DWORD;
VolumeFlags: DWORD;
VolumeInfo: array[0..MAX_PATH] of Char;
VolumeSerialNumber: DWORD;
GetVolumeInformation(PChar(DriveLetter + ':\'),
nil, SizeOf(VolumeInfo), @VolumeSerialNumber, NotUsed,
VolumeFlags, nil, 0);
Result := Format('Label = %s VolSer = %8.8X',
[VolumeInfo, VolumeSerialNumber])

procedure TForm1.Button1Click(Sender: TObject);

7 Responses so far.

  1. daspeac says:

    I have heard about another way of Recover MDB. Besides, you can visit my blogs at: or where I’m trying to share my experience with regard to data corruption issues

  2. Anonymous says:

    I simply couldn't leave your website prior to suggesting that I actually loved the usual info a person supply for your guests? Is gonna be again often to investigate cross-check new posts

    my blog - buccket truck
    Stop by my website ... bucket trucks

  3. Anonymous says:

    Hi to eνeгу one, it's genuinely a fastidious for me to go to see this web site, it includes priceless Information.

    Review my web-site - okc roofing

  4. Anonymous says:

    My partnеr and I stumbled oveг hеrе frοm a ԁiffеrent ωebsitе anԁ
    thought I might as well chесk things out.
    I liκe what I see ѕo nοω і'm following you. Look forward to going over your web page repeatedly.

    Also visit my webpage - How To Buy And Sell Cars Guide

  5. Anonymous says:

    Great post! Wе will be linkіng to thiѕ greаt pοst
    on ouг ωеbsite. Keep up the good ωritіng.

    Here iѕ my homepagе how to buy and sell cars for profit

  6. Anonymous says:

    Wow that was unusual. Ι just wrοte an really long сomment
    but after I clicked submit my commеnt ԁidn't appear. Grrrr... well I'm not writing all that over again.
    Anywaу, just wanted to saу grеat blog!

    my blog post - http://www.tensunitsupplies.Com

Post a Comment

Thank you for your comment.

Any request and idea are welcome.