[Lazarus] GetVolumeInformation
cyber python
cyberpython at gmail.com
Tue Apr 29 11:16:29 CEST 2008
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;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20080429/19f60dfc/attachment-0004.html>
More information about the Lazarus
mailing list