Lol, jupp Danke klappt!
/edit
für die Nachwelt, so isses nu :]
Delphi-Quellcode:
function ReadIniStream( const Filename, Section, Ident: String; const FolderOverride: String = '' ): TStream;
var
FIniFile: TIniFile;
FName: String;
begin
FName := GetSpecialFolderPath( CSIDL_LOCAL_APPDATA );
if FName = '' then
Exit;
if FolderOverride = '' then
FName := FName + '\' + SysUtils.ChangeFileExt( SysUtils.ExtractFilename( ParamStr( 0 ) ), '.' ) + '\' + Filename
else
FName := FName + '\' + FolderOverride + '\' + Filename;
if not FileExists( FName ) then
Exit;
FIniFile := TIniFile.Create( FName );
try
Result := TMemoryStream.Create();
try
FIniFile.ReadBinaryStream( Section, Ident, Result );
finally
Result.Position := 0;
end;
finally
FIniFile.Free;
end;
end;