Código
Var
Serial:DWord;
DirLen,Flags: DWord;
DLabel : Array[0..11] of Char;
result,drive:string;
begin
GetVolumeInformation(PCharDrive+':'),dLabel,12,@Serial,DirLen,Flags,nil,0);
Label1.Caption := IntToHex(Serial,8);
end;
procedure TForm1.BitBtn2Click(Sender: TObject);
var
SerialNum : pdword;
a, b : dword;
Buffer : array [0..255] of char;
begin
GetVolumeInformation('c:', Buffer, SizeOf(Buffer), SerialNum, a, b, nil, 0);
Label2.Caption := IntToStr(SerialNum^);
end;
Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009