Get Volume Name
This function used to get volume name.
function VolumeName(DriveName: Char): string;
var
max, Flags: DWORD;
Buf: array [0..MAX_PATH] of Char;
begin
try
GetVolumeInformation(PChar(DriveName + ‘:\’), Buf, sizeof(Buf), nil, max, Flags, nil, 0);
Result := StrPas(buf);
except
result := ”;
end;
end;
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
Edit1.Text := VolumeName(’C');
end;
Download: Source Code
Component / Wrapper to use the 7zip dll. Easy to use. Multi-...
SmartFlash is a VCL with additional features in Macromedia F...
SmartFlash is a VCL with additional features in Macromedia F...
Thursday 22 Feb 2007 | Delphi Tutorial | System
Thanks for your source code