Skip to content

TProcess.ReadInputStream

Read available data from input stream.

Declaration

Source position: processbody.inc line 198

public 
function ReadInputStream(p: TInputPipeStream; var BytesRead: Integer; 
                        var DataLength: Integer; var Data: string; 
                        MaxLoops: Integer=10) : Boolean;  virtual;

function ReadInputStream(p: TInputPipeStream; data: TStream; 
                        MaxLoops: Integer=10) : Boolean;  virtual;

Description

ReadInputStream reads data from the given input pipe stream p after checking that data is available. It returns True if data was succesfully read from the file handle. In the variant with a string data, the data is placed in the string Data, and DataLength is updated with the new length, BytesRead is updated with the amount of bytes read. MaxLoop determines how often an attempt at reading data is made.

In the variant with a stream, the available data is simply written to the stream.

Errors

None.