Remember to include Windows in your uses clause :
function GetVolumeID(DriveChar: Char): String;
//Para obtener el # de serie de un disco
var
MaxFileNameLength, VolFlags, SerNum: DWord;
DrivePath : String;
begin
DrivePath := DriveChar + ':\';
if GetVolumeInformation(PChar(DrivePath), nil, 0,
@SerNum, MaxFileNameLength, VolFlags, nil, 0)
then
begin
Result := IntToStr(SerNum);
end
else
Result := '';
end;
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus