...
Arguments
...
1 | Type | Name | Comment | |
2 | INTEGER | resultString | xpxP_WAIT, xpxP_NOWAIT or xpxP_NOWAITO are the available legal valuesmode |
In addition to these, there are two more option that are not available directly to the user, but can be used through their direct integer code.
|
3 | STRING | executableName | the name of the program or ".exe" file to be started. | |
4 | SET OF STRING | commandLineArguments | a set of strings that specifies the "command line arguments" to the actual program to be started. This argument may be INDETERMINATE. | |
5 | SET OF STRING | environmentVariables | a set of strings that specifies the environment variables to be defined for the actual program to be started. This argument may be INDETERMINATE | |
6 | INTEGER | exitStatus | receives the "exit status" from the actual started program. This argument may be INDETERMINATE. |
...
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Options
...
...
Example
...
Code Block | ||
---|---|---|
| ||
LOCAL case_name : STRING := 'Case 01, testing xpxSpawnProcess'; case_no : INTEGER := 1; ok : LOGICAL := TRUE; mode : INTEGER; executableName : STRING; commandLineArguments : SET OF STRING; environmentVariables : SET OF STRING; exitStatus : INTEGER; rstat : INTEGER; END_LOCAL; -- ----------------------------- -- 1a. Testing xpxSpawnProcess. -- ----------------------------- trace(case_no, '1a. Testing xpxSpawnProcess'); mode := XPX_P_WAIT; executableName := 'X:/terje/testParams.exe'; commandLineArguments[0] := 'one'; commandLineArguments[1] := 'two'; commandLineArguments[2] := 'three'; environmentVariables[0] := 'PATH=X:\terje'; rstat := xpxSpawnProcess(mode, executableName, commandLineArguments, environmentVariables, exitStatus); trace_error(::CL::, rstat, ok); ok := CheckValueExists(exitStatus, ::CL::) AND ok; ok := (exitStatus = 0) AND ok; xpxPrintf('* exitStatus = %d\n', exitStatus); |
...