[Overview][Classes][Procedures and functions][Index] | Reference for unit 'AsyncProcess' (#lcl)

# TAsyncProcess.OnReadData

Event handler signalled when output data is available for the process.

## Declaration

Source position: asyncprocess.pp line 52

`published property TAsyncProcess.OnReadData : TNotifyEvent read FOnReadData write FOnReadData;`

## Description

OnReadData is a TNotifyEvent property that implements the event handler signalled when data is available for the process. Applications should assign a procedure to the event handler that responds to the pipe notification. The procedure must handle all data available on the Output handle up to the number of bytes in NumBytesAvailable. All available data must be handled, or the procedure will be called repeatedly until no more data is available.

OnReadData is signalled (when assigned) from the HandlePipeInput method when the prDataAvailable flag is found in the parameters passed to the method.

## See also

TAsyncProcess.NumBytesAvailable |  | Number of output bytes available from the process.
TPipeReason |  | Represents reasons that a pipe event was signalled.
TProcess.Output
TNotifyEvent