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

TAsyncProcess

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Implements a process with asynchronous notifications for data and termination.

Declaration

Source position: asyncprocess.pp line 35

type TAsyncProcess = class(TProcessUTF8)

protected

  function GetNumBytesAvailable;

  

Gets the value for the NumBytesAvailable property.

  procedure HandlePipeInput();

  

Implements asynchronous notifications during execution of the process.

  procedure HandleProcessTermination();

  

Performs actions needed when the process is terminated.

  procedure UnhookPipeHandle;

  

Removes the pipe handler assigned for the process.

  procedure UnhookProcessHandle;

  

Removes the process handler assigned for the process.

public

  procedure Execute; override;

  

Executes the process.

  destructor Destroy; override;

  

Destructor for the class instance.

  property NumBytesAvailable: dword; [r]

  

Number of output bytes available from the process.

published

  property OnReadData: TNotifyEvent; [rw]

  

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

  property OnTerminate: TNotifyEvent; [rw]

  

Event handler signalled when the process is terminated.

end;

Inheritance

TAsyncProcess

  

Implements a process with asynchronous notifications for data and termination.

|

TProcessUTF8

|

TPROCESS

|

TComponent,IUnknown,IInterfaceComponentReference

|

TPersistent,IFPObserved

|

TObject

Description

TAsyncProcess is a TProcessUTF8 descendant which implements support for asynchronous notifications when data is available for the process. Internally, TAsyncProcess uses pipe and process handlers to detect when data is written to the Output handle, and when the process is terminated. TAsyncProcess provides OnReadData and OnTerminate event handlers signalled for the corresponding asynchronous notifications.

See also

TAsyncProcess.OnReadData

  

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

TAsyncProcess.OnTerminate

  

Event handler signalled when the process is terminated.

TProcessUTF8

TProcess.Output


Version 3.2 Generated 2024-02-25 Home