The drive’s serial number can be useful for for a lot of things (check out previous tip). This example code shows you how to read the hard drives serial number.
function GetHddSerial: Integer;
var
aBuffer: array [0..255] of Char;
dwTemp: DWord;
pdwSerial: PDWord;
begin
if GetVolumeInformation(’c:’, aBuffer, SizeOf(aBuffer), @pdwSerial, dwTemp, dwTemp, nil, 0) then
[...]
Merlin’s Delphi Forge