#include <system_process.h>
This interface allows to access and create system processes.
Static Public Member Functions | |
static MAXON_METHOD Result< SystemProcessObjectRef > | CreateProcess (const Url &programPath, const ArrayInterface< String > &arguments, EXECUTEPROGRAMFLAGS flags, void *userData, const InOutputStreamRef &stdinPipe=InOutputStreamRef(), const InOutputStreamRef &stdoutPipe=InOutputStreamRef(), const InOutputStreamRef &stderrPipe=InOutputStreamRef()) |
static MAXON_METHOD Result< SystemProcessObjectRef > | StartProcessAndWait (const Url &programPath, const ArrayInterface< String > &arguments, EXECUTEPROGRAMFLAGS flags, ExecuteProgramCallback callback, void *userData) |
static MAXON_METHOD Result< void > | GetSystemProcesses (const ValueReceiver< const SystemProcessObjectRef & > &processes) |
static MAXON_METHOD UInt | GetCurrentProcessId () |
static MAXON_METHOD Result< SystemProcessObjectRef > | GetProcess (UInt id) |
static MAXON_METHOD Result< WAIT_PROCESS_RESULT > | WaitForProcess (const SystemProcessObjectRef &processRef, const TimeValue &timeout) |
Private Member Functions | |
MAXON_INTERFACE_NONVIRTUAL (SystemProcessInterface, MAXON_REFERENCE_NONE, "net.maxon.interface.systemprocess") | |
|
private |
|
static |
Prepares an executable to be executed as a process. If EXECUTEPROGRAMFLAGS::CAPTURELOGFILE is set all pipe parameters will be ignored.
[in] | programPath | File path to the executable. It needs to be a valid path to a URLSCHEME_FILESYSTEM path. If an stdout and stderr pipe is used CAPTURELOGFILE will be ignored. |
[in] | arguments | Array of parameters to start the executable with. |
[in] | flags | See EXECUTEPROGRAMFLAGS flags. |
[in] | userData | User data that can be attached to this process. |
[in] | stdinPipe | Pipe where stdin is redirected to. |
[in] | stdoutPipe | Pipe where stdout is redirected to. |
[in] | stderrPipe | Pipe where stderr is redirected to. |
|
static |
Starts and waits for a process.
[in] | programPath | File path to the executable. It needs to be a valid path to a URLSCHEME_FILESYSTEM path. |
[in] | arguments | Array of parameters to start the executable with. |
[in] | flags | See EXECUTEPROGRAMFLAGS flags. |
[in] | callback | Pointer to a Callback function called while the executable is running. See ExecuteProgramCallback. |
[in] | userData | User data that can be attached to this process. |
|
static |
Enumerates all system processes and returns a list of them.
[out] | processes | The receiver for the system processes. |
|
static |
Gets the process ID of the current running process.
|
static |
Creates a process object for the given process ID. The returned object will have only limited capabilities. E.g. you cannot get the logfile or user data.
[in] | id | ID of the process you want to create an object for. |
|
static |
Waits for the given process to finish.
[in] | processRef | Process object to wait for. |
[in] | timeout | Timeout to wait for the process to finish. |