CloseProcess Method

PocketBrowser 3.x API

The CloseProcess Method of the Generic ActiveX Object closes the handle opened by LaunchProcessNonBlocking.

CloseProcess (Method of the Generic ActiveX Object) Syntax

ParametersW Toggle Parameters

Items listed in this section indicate parameters, or attributes which can be set.

Name Possible Values Description
Default Value
hProcessHandle Handle Handle returned by LaunchProcessNonBlocking N/A

Examples Toggle Examples

The following javascript example launches CtlPanel and closes the handle:

var objGeneric = new ActiveXObject("PocketBrowser.Generic");
var hProcess = objGeneric.LaunchProcessNonBlocking('\\application\\ctlpanel.exe', '');
Copy example to clipboard Copy example to clipboard

Remarks Toggle Remarks

This method must be called some time after LaunchProcessNonBlocking to avoid a resource leak in Windows. Note that this method does not wait for the process to finish, it simply closes the handle when it's no longer needed. To wait for the process to finish use WaitProcess.

Info Toggle Additional Information

Supported Platforms Windows CE, Windows Mobile
Persistence Runs immediately.
Min. Requirements None.