START_PROCESS@

Platform

Win32, x64

Purpose

To create a new process and wait for it to terminate.

Syntax

INTEGER FUNCTION START_PROCESS@( COMMAND, PARAMS )
CHARACTER(*) COMMAND,PARAMS

Description

COMMAND is the command line that is to be executed. PARAMS is a string of parameters that is appended to the command line.

Return value

Returns 0 or a positive value if successful. A return value of -1 indicates an error condition.

Notes

The new process is given the same 'show' state as that used when creating the calling process. This will usually be 'show normal' or 'show maximised'.

The alternative function START_PPROCESS@ takes the same form but returns immediately (i.e. it does not wait for the created process to terminate).

In order to issue a DOS command you will need to invoke the command shell by using the prefix 'cmd /c ' followed by the DOS command. The alternative is to call CISSUE@

Example

INTEGER START_PROCESS@,i
i=START_PROCESS@('run.exe',' ')
END

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited