How To Get Volume Name | |||
| |||
function VolumeName(Laufwerk: Char): string; var max, Flags: DWORD; Buf: array [0..MAX_PATH] of Char; begin try GetVolumeInformation(PChar(Laufwerk + ':'), Buf, sizeof(Buf), nil, max, Flags, nil, 0); Result := StrPas(buf); except result:=''; end; end; procedure TForm1.Button1Click(Sender: TObject); begin Label1.Caption:=(VolumeName('v')); end; Tags: Delphi GetVolumeInformation HDD Volume Lable HDD Volume Name Hard Disk Volume Lable Hard Disk Volume Name Volume Name | |||
| |||
| |||
Login for comment |