[Overview][Types][Classes][Procedures and functions][Variables][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Class to start and control other processes.
Source position: process.pp line 50
type TProcess = class(TComponent) |
||
public |
||
constructor Create(); override; |
|
Create a new instance of the TProcess class. |
destructor Destroy; override; |
|
Destroy this instance of TProcess |
procedure Execute; virtual; |
|
Execute the program with the given options |
procedure CloseInput; virtual; |
|
Close the input stream of the process |
procedure CloseOutput; virtual; |
|
Close the output stream of the process |
procedure CloseStderr; virtual; |
|
Close the error stream of the process |
function Resume; virtual; |
|
Resume execution of a suspended process |
function Suspend; virtual; |
|
Suspend a running process |
function Terminate(); virtual; |
|
Terminate a running process |
function WaitOnExit; |
|
Wait for the program to stop executing. |
|
Positions for the main program window. |
|
|
Handle of the process |
|
|
Alias for Handle |
|
|
Main process thread handle |
|
|
ID of the process. |
|
|
ID of the main process thread |
|
|
Stream connected to standard input of the process. |
|
|
Stream connected to standard output of the process. |
|
|
Stream connected to standard diagnostic output of the process. |
|
|
Exit status of the process. |
|
InheritHandles: Boolean; |
|
Should the created process inherit the open handles of the current process. |
|
Event triggered after fork occurred on Linux |
|
published |
||
Active: Boolean; |
|
Start or stop the process. |
|
Name of the application to start (deprecated) |
|
CommandLine: ; |
|
Command-line to execute (deprecated) |
Executable: ; |
|
Executable name. Supersedes CommandLine and ApplicationName. |
|
Command-line argumens. Supersedes CommandLine. |
|
ConsoleTitle: ; |
|
Title of the console window |
|
Working directory of the process. |
|
Desktop: ; |
|
Desktop on which to start the process. |
|
Environment variables for the new process |
|
|
Options to be used when starting the process. |
|
|
Priority at which the process is running. |
|
|
Additional (Windows) startup options |
|
Running: Boolean; |
|
Determines wheter the process is still running. |
|
Determines how the process main window is shown (Windows only) |
|
|
Number of columns in console window (windows only) |
|
|
Height of the process main window |
|
|
X-coordinate of the initial window (Windows only) |
|
|
Number of rows in console window (Windows only) |
|
|
Y-coordinate of the initial window (Windows only) |
|
|
Height of the process main window (Windows only) |
|
|
Color attributes of the characters in the console window (Windows only) |
|
XTermProgram: ; |
|
XTerm program to use (unix only) |
end; |
|
Class to start and control other processes. |
|
| | ||
| | ||
| | ||
TProcess is a component that can be used to start and control other processes (programs/binaries). It contains a lot of options that control how the process is started. Many of these are Win32 specific, and have no effect on other platforms, so they should be used with care.
The simplest way to use this component is to create an instance, set the CommandLine property to the full pathname of the program that should be executed, and call Execute. To determine whether the process is still running (i.e. has not stopped executing), the Running property can be checked.
More advanced techniques can be used with the Options settings.
|
Create a new instance of the TProcess class. |
|
|
Execute the program with the given options |
|
|
Determines wheter the process is still running. |
|
|
Command-line to execute (deprecated) |
|
|
Options to be used when starting the process. |