Cette fonction devrait te donner satisfaction.
Elle fait appel à Windows.pas.
function GetVolumeName(Drive: Char): String;
var
DrivePath: String;
MaximumComponentLength: DWORD;
FileSystemFlags: DWORD;
VolumeName: String;
begin
Result := '';
DrivePath := Drive + ':\';
SetLength(Result, 64) ;
GetVolumeInformation(PChar(DrivePath),
PChar(Result),
Length(Result),
nil,
MaximumComponentLength,
FileSystemFlags,
nil,
0);
end;
Bonne prog' :-p
N'oubliez pas de valider "Réponse acceptée" si ça vous convient, de toute manière vous ne pouvez pas valider autre chose ! :big)