Registriert seit: 18. Aug 2004
Ort: Edewecht
712 Beiträge
Delphi 5 Professional
|
Re: Problem bei GetVolumeInformation
9. Mär 2005, 11:23
Delphi-Quellcode:
function GetVolumeSerialNo(Drive: Char): DWORD;
begin
GetVolumeInformation(PChar(Drive + ':\'), nil, 0, @Result, DWORD(nil^), DWORD(nil^), nil, 0);
end;
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
Serial: DWORD;
begin
Serial := GetVolumeSerialNo('D');
ShowMessage(IntToHex(HiWord(Serial), 4) + '-' + IntToHex(Word(Serial), 4));
end;
Ciao, Sprint.
"I don't know what I am doing, but I am sure I am having fun!"
|
|
Zitat
|