Bir harddiskin seri numarasının bulunması

Son güncelleme: 03.03.2006 21:09
  • Hard diskin seri numarasını bulur.

    procedure TForm1.Button1Click(Sender: TObject);

    var

    VolumeSerialNumber : DWORD;

    MaximumComponentLength : DWORD;

    FileSystemFlags : DWORD;

    SerialNumber : string;

    begin

    GetVolumeInformation('C:\', nil, 0, @VolumeSerialNumber,

    MaximumComponentLength, FileSystemFlags, nil, 0);

    SerialNumber := IntToHex(HiWord(VolumeSerialNumber), 4) + '-' + IntToHex(LoWord(VolumeSerialNumber), 4);

    Memo1.Lines.Add(SerialNumber);

    end;
#03.03.2006 21:09 0 0 0