April 26, 2024

Dynamic Windows Function [dw_exec]

Syntax

int dw_exec(char *program, int type, char **params)

Parameters

char *program: Program name with optional path.
int type: Either DW_EXEC_CON or DW_EXEC_GUI.
char **params: An array of pointers to string arguements.

Returns

int Process ID or DW_ERROR_NONE (0) on success or DW_ERROR_UNKNOWN (-1) on error.

Description

Execute an external program in a separate session.

Remarks

DW_EXEC_CON and DW_EXEC_GUI are not required on OS/2 and Windows, these systems will create a console window automatically if required. DW_EXEC_CON on GTK will attempt to run xterm prior to version 3.2, on 3.2 or later it will use the terminal application defined in Gnome settings. DW_EXEC_CON on Mac prior to version 3.2 will attempt to run xterm to execute the application, however xterm is not included with MacOS since 10.7, but is a free XQuartz download. On 3.2 or later it will use AppleScript to run it in the Terminal.app included with MacOS.