Ler o Volume do HD


Function ExtractDiskSerial(Drive:String):String;

Var
Serial:DWord;
DirLen,Flags: DWord;
DLabel : Array[0..11] of Char;

begin
GetVolumeInformation(PChar(Drive+:\),dLabel,12,@Serial,DirLen,Flags,nil,0);
Result := IntToHex(Serial,8);
end;