JCL Help:TJclAppInstances.CheckInstance

From Project JEDI Wiki
Jump to navigationJump to search


Summary[edit]

Check the number of running instances.


Pascal[edit]

 public function CheckInstance(MaxInstances: Word; MaxSessionInstances: Word = 0; MaxUserInstances: Word = 0): Boolean;


Parameters[edit]

Parameters Description
MaxInstances: Word Maximum count of running instances


Return Value[edit]

If fewer than MaxInstances applications are running the result is True, otherwise the result is False.


Description[edit]

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.


See Also[edit]

TJclAppInstances.CheckSingleInstance TJclAppInstances.CheckMultipleInstances TJclAppInstances.KillInstance


About[edit]

Donator[edit]

Petr Vones


Contribute to this help topic[edit]

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