Syntax
[C/C++:]
int gExecuteSysCommand(char command[], ...);
[F90:]
integer function gExecuteSysCommand(command, gShow, gSuspend, gHandle)
character*(*), intent(in) :: command
integer, optional, intnent(in) :: gShow, gSuspend
integer, optional, intent(out) :: gHandle
Arguments
command
System command string
Optional Args
gShow
Visible state of Windows process
|
= GHIDDEN, |
Run as background process (no window) |
|
= GNORMAL, |
Run in normal window (default) |
|
= GMINIMIZE, |
Run in minimized/iconized window |
|
= GMAXIMIZE, |
Run in maximized window |
gSuspend
Suspension state of calling application
|
= GON, |
Suspend calling application while process runs |
|
= GOFF, |
Return control to calling application immediately after starting new process (i.e. Run new process in parallel). This is the default. |
gHandle
Handle of new process (available when not suspending calling application)
Description
The system utility gExecuteSysCommand() provides a means to execute a system command or process from within a GINO application. By default, the function will create a new process on the host machine to execute the command and control will be immediately passed back to the GINO application. In a Windows environment, the process will be run in a normal window, and in all environments output from the command will be directed to the standard output stream unless re-directed using appropriate operating system commands or symbols.
The optional argument
gShow may be used in a Windows environment to alter the initial state of the window in which the process is run.
Where the new process is running in parallel with the GINO application, its process handle way be obtained by using the optional output argument
gHandle. This may then be used in subsequent system commands or routines to track its progress or halt it if required (see gKillSysCommand()). The handle is not available if the calling application is suspended whilst the separate process runs.
The routine returns a value which is set to a system dependent non-zero value if the command was illegal or failed for some reason.
See Also
gExecuteSysCommand UsagegKillSysCommand