company logo

CTX_Base :: ExecuteProgram - Run executable binary

The function calls an executable file at location passed in "prgnams". Depending on the fork parameter passed to the function, the new process may replace the running process (fork NO) or run asynchronously to the current process (fork YES).

In case of fork is false (NO), i.e. when replacing the current process, the function acts slightly different under UNIX and Windows. Under UNIX the new process starts not before the current process has stopped. Under windows, the new process is started and immediately after starting the current process exits. Thus, under Windows, processes may overlap, especially, when the current process has time consuming at_exit() handling. In this case, the application invoking the new process must close all time-critical resources before calling the new process.

Before calling the process, options defined in path and parameters are replaced by current option values. Options must be enclosed in %..%.

Return value:  Success ( logical  )

Implementation details

  1. - internal feature (not documented)
    logical CTX_Base  :: ExecuteProgram ( NString &prgnams, NString parms[], int32 iCount )
    • prgnams - Program path
    • parms[] - - Title unknown
    • iCount - Number of items

      The value contains the number of items to be processed or stored in a collection.

  2. to list
  3. - internal feature (not documented)
    logical CTX_Base  :: ExecuteProgram ( NString &prgnams, NString &parm1_w=NString::Null(), NString &parm2_w=NString::Null(), NString &parm3_w=NString::Null(), NString &parm4_w=NString::Null(), NString &parm5_w=NString::Null() )
    • prgnams - Program path
    • parm1_w - Optional string parameter Default: NString::Null()
    • parm2_w - Optional string parameter Default: NString::Null()
    • parm3_w - Optional string parameter Default: NString::Null()
    • parm4_w - Optional string parameter Default: NString::Null()
    • parm5_w - Optional string parameter Default: NString::Null()
  4. to list