Previous topic

SynEdToggleFolding

Next topic

TableAddBrush

This Page

systemΒΆ

system creates a new process.

bool = system(ssName)
bool = system(ssName, nShow)
bool = system(ssName, nShow, bSynchron)
bool = system(ssName, nShow, bSynchron, bGetExitCode)

Return Value

If system() is invoked with 1 to 4 parameters: bool is TRUE (1) if the process has been successfully created, and FALSE (0) if the process could not be created.

If system() is invoked with bGetExitCode set to TRUE (1): If the process could not be created, an error object is returned (see error_create) and otherwise the return value of the process is returned. bSynchron must be set to TRUE (1).

Parameters

ssName

ssName is a string that specifies the command line to execute.

nShow

nShow specifies the default value the first time ShowWindow is called to display the process on the monitor. Default value is SW_SHOW. Possible values are:

SW_HIDE (0)
SW_SHOWNORMAL (1)
SW_NORMAL (1)
SW_SHOWMINIMIZED (2)
SW_SHOWMAXIMIZED (3)
SW_MAXIMIZE (3)
SW_SHOWNOACTIVATE (4)
SW_SHOW (5)
SW_MINIMIZE (6)
SW_SHOWMINNOACTIVE (7)
SW_SHOWNA (8)
SW_RESTORE (9)
SW_SHOWDEFAULT (10)
SW_MAX (10)
bSynchron

If bSynchron is TRUE (1) the function waits until the new process has finished. Otherwise the function returns without waiting for the new process to finish. Default value is FALSE (0).

bGetExitCode

If bGetExitCode is TRUE (1), the return code of the process is returned. See the description of the return value. bSynchron must be set to TRUE (1).

Example

system("notepad", SW_SHOWMAXIMIZED, TRUE);

History

Version Description
5.3.0 New parameter bGetExitCode.

id-544257