Execute provided console command with feedback. This can be used to start an application program and obtain the exit code from that invoked program.
This function passes the command string to the command interpreter and specifies with the
report argument an object where the caller desires feedback be written by the invoked command.
Internal commands are processed in the current task, external commands (.BEX files) are loaded and executed in a new task.
Only certain commands will make use of this provided
report argument. The structure of the referenced object is specific to each command which provides feedback. These commands are:
COPY - report data in structure CmdFeedbackS
CHKDSK - report data in structure DiskStatS
FORMAT - report data in structure CmdFeedbackS
PFI - report data in structure PfiStatS
External commands (.BEX files) - The invoked program can access the object at
report using the progParentData() function. The format of this object is user defined, however the first two integer values must correspond to the ProgFeedbackS data structure. The second integer (signed) will be set to the program's DOS exit code value. The remainder of the structure following these two required integer values can be what ever the user desires, or none at all (void).
report argument is ignored by any other commands. However, for compatibility with future @CHIP-RTOS-PPC versions this should not be relied upon.
|[in] ||command_line ||Null terminated command line string. |
|report ||Output parameter: Object in user memory where certain commands provide feedback. |
- 0 - Successful
+1 - Internal command had a problem
-1 - Attempt to launch a DOS program by this name failed
- See also:
- SC2x3 V1.05 - CLIB V1.03