We don't display ads so we rely on your Bitcoin donations to 1KWEk9QaiJb2NwP5YFmR24LyUBa4JyuKqZ
Post date: Sep 18, 2010 9:39:46 PM
Returns the display name for the drive with the given root path.
function DriveDisplayName(const Drive: string): string;
var
FI: ShellAPI.TSHFileInfo; // info about drive
begin
ShellAPI.SHGetFileInfo(
PChar(Drive),
0,
FI,
SizeOf(FI),
ShellAPI.SHGFI_DISPLAYNAME)
;
Result := FI.szDisplayName;
end;