xHarbour Reference Documentation > Function Reference |
Retrieves the return value of a child process.
HB_ProcessValue( <nProcessHandle>, ; [<lWaitForTermination>] ) ) --> nErrorLevel
The function obtaines the return code of the program running in the child process. This return code is set via ErrorLevel() when the child process runs an xHarbour application. If the child process has not finished program execution when HB_ProcessValue() returns, the return value is -1.
HB_ProcessValue() can be used for two purposes: it can check if a child process started with HB_OpenProcess() is still executing its program, or it can halt the parent process until the child process is complete with program execution.
To "kill" a program running in a child process, call HB_CloseProcess() and pass .F. (false) as second paremeter.
See also: | HB_CloseProcess(), HB_OpenProcess() |
Category: | Process functions , xHarbour extensions |
Source: | rtl\philes.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
http://www.xHarbour.com