Sign in Join
FPDoc Onlineexperiment

TAsyncProcess.HandlePipeInput procedure

Member of TAsyncProcessprotectedIn unit AsyncProcess

Implements asynchronous notifications during execution of the process.

Declaration

pascal
procedure HandlePipeInput(AData: PtrInt; AReasons: TPipeReasons)

Arguments

AData

Data available on the input handle.

AReasons

Reason the data was written for the handler.

Description

HandlePipeInput is a procedure which implements support for asynchronous notifications which occur during execution of the process. HandlePipeInput is assigned using AddPipeEventHandler when Execute is called.

HandlePipeInput examines values in AReasons to determine the action for the notification. When AReasons includes the value prBroken, the pipe has been closed and UnhookPipeHandle is called. When prDataAvailable is included in AReasons, the OnReadData event handler is signalled (when assigned).

Use OnReadData to respond to arrival of data on the handle for the process. Use NumBytesAvailable is determine the number of bytes available.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.