Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - exec() execute a child process http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 exec()              Execute a child process
------------------------------------------------------------------------------
 Declaration
   system.hdr

 Syntax
   func logical exec extern
   param const char    cCommandLine, ;
         value logical lSwapToDisk

 Arguments
   cCommandLine is a string specifying the program to execute.

   lSwapToDisk indicates if the current program state is to be
   swapped to disk for releasing more memory for the child process.

 Return
   A logical indicating if the child process could be executed.

 Description
   The exec() function executes a child process, with optional swap to disk.
   It is similar to the run command, with a few differences. The exec()
   function requires full pathname and extension, as the DOS path is not
   searched for the program to execute. Internal DOS commands can not be
   executed via exec(). The code overhead of the exec() function is
   significantly less than that of the run command.

 Example
   #define EXAMPLE_SYSTEM
   #include example.hdr

   proc Test_exec
   ? exec( "c:\command.com", .t. )
   endproc

   proc main
   Test_exec()
   endproc

See Also: run

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson