probier mal anstatt dem hier:
Delphi-Quellcode:
Stream := TMemoryStream.Create;
try
while true do begin
succeed := ReadFile(PipeOutputRead, Buffer, 255, NumberOfBytesRead, nil);
if not succeed then
break;
Stream.Write(Buffer, NumberOfBytesRead);
Stream.Position := 0;
Output.LoadFromStream(Stream);
end;
finally
Stream.Free;
end;
CloseHandle(PipeOutputRead);
das hier zu verwenden:
Delphi-Quellcode:
Output.Clear;
Output.Strings.Add('');
try
while true do begin
succeed := ReadFile(PipeOutputRead, Buffer, 255, NumberOfBytesRead, nil);
if not succeed then
break;
Output[0] := Output[0]+Buffer;
end;
finally
Stream.Free;
end;
CloseHandle(PipeOutputRead);
So fügst du immer den gerade herausgelesenen Text der Stringlist hinzu...