function TOSPhysicalDrivePathGetter.ParseVolumeNameIntoList( const AllDrives: PTVolumeNameBuffer): TDrivePathNumberList; var CurrentCharIndex: Integer; CurrentName: PChar; begin CurrentCharIndex := 0; result := TDrivePathNumberList.Create; while CurrentCharIndex < Length(AllDrives^) do begin CurrentName := @(AllDrives^)[CurrentCharIndex]; if CurrentName = '' then break; if IsPhysicalDrive(CurrentName) then result.Add(ParseSeparatedName(CurrentName)); Inc(CurrentCharIndex, Length(CurrentName) + 1); end; end;