xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

HB_CloseProcess()

Closes a child process

Syntax

HB_CloseProcess( <nProcessHandle>, ;
                [<lWaitForTermination>] ) --> lSuccess

Arguments

<nProcessHandle>
This is the numeric process handle of the child process to close. It is returned from HB_OpenProcess().
<lWaitForTermination>
This parameter defaults to .T. (true) so that the parent process waits until the child process has regularly ended with program execution. When .F. (false) is passed, the program running in the child process is unconditionally terminated (it gets "killed").

Return

The function returns .T. (true) when the child process has successfully ended program execution, otherwise .F. (false) is returned.

Description

The function waits for the end of program execution in a child process previously opened with HB_OpenProcess(). If the child process is still executing its program, HB_CloseProcess() waits for the termination of the program running in the child process, unless <lWaitForTermination> is set to .F. (false).

Use function HB_ProcessValue() to determine if a child process is still executing its program.

Note:  when program execution in the child process has ended, the handle <nProcessHandle> must be explicitly closed by passing it to FClose().

Info

See also:HB_OpenProcess(), HB_ProcessValue(), StopThread(), QUIT
Category: Process functions , xHarbour extensions
Source:rtl\philes.c
LIB:xhb.lib
DLL:xhbdll.dll


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe