JCL Help: TJclAppInstances.CheckInstance Method
- Project summary
Search in JCL HelpSearch in all projects
Check the number of running instances.
public function CheckInstance(MaxInstances: Word; MaxSessionInstances: Word = 0; MaxUserInstances: Word = 0): Boolean;
|MaxInstances: Word||Maximum count of running instances|
If fewer than MaxInstances applications are running the result is True, otherwise the result is False.
CheckInstance determines whether fewer than MaxInstances application instances are running. If this is true, the process is registered as a running instance and a notification is sent to all other running instances, otherwise the function does nothing. Note that unlike TJclAppInstances.CheckSingleInstance, the application is not terminated and none of the already running instances is brought to the foreground. It's up to the application programmer to decide what to do if the function fails. You could, for example, terminate the application yourself by calling TJclAppInstances.KillInstance.
Contribute to this help topic
This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page