Promotic

LicenceInfo - method of the Pm object

Description:
Obtains information about licences (in licence key) of the PROMOTIC application.
Syntax:
Variant LicenceInfo(Long nWhat)
Parameters:
nWhat(Long) Type of read values:
0 - Licence number (number of the licence key).
1 - Unique user number (PmUserNumber). It is used to the security of starting the runtime of the PROMOTIC application, see Example. If the user group is not included in the licence, then it returns number 0.
For the security of the development environment: see the "The authorization of editing the application" configuration window.
2 - Licence mode (no licence key, runtime, development). It does not read the new content of the licence key but it returns the values that were read earlier. It means that this property does not catch exchanging the licence key for another one or its removing.
3 - (obsolete) Calling priority lecence refresh (asynchronous operation). This operation is now irrelevant because the system initiates licence refresh automaticaly every 10 minutes. Lost licence is detected by operation 10 (the value of parameter nWhat is 10). The returned value is irrelevant because of the protection time period that allows the application to run without the licence before it is stopped.
10 - Time duration of communication malfunction with the licence server in seconds or directly with the licence carrier. The 0 value means that the last licence refresh was completed correctly. Value > 0 means that several previous licence refreshes failed. Each successfull licence refresh resets the time to zero. In order to indicate the information regarding failed licence refresh in both local and Web panels it is handy to use the "SP - Data binding to the object Pm property" data binding to this method. Example of the configurator content with binding $db.SP(0,"LicenceInfo(10)").
11 - Time in seconds of licence error duration after which a "notification" window for the operator is displayed (default 10 minutes i.e. 600 seconds).
12 - Time in seconds after which the application stops if the communication with the licence server continues to malfunction (default 48 hours i.e. 172800 seconds).
23 - Maximum number of "PmWebClient" type clients. The information about the clients states can be found in the INFO system on the "/COMM/ClientLicence" tab.
24 - Currect count of connected "PmWebClient" type clients.
25 - Maximum number of "PmDataClient" and "PmWebClient" type clients.
26 - Current count of connected clients of the "PmDataClient" and "PmWebClient" type. This information can be useful for example for monitoring of Web activity.
Note:
This method is not functional in Web panels.
Example:
Whether the secured application is started only with the licence (licence key) that includes user number 123. Into the PmaRoot.onAppStartBegin event it is enough to enter, for example, the following script:
JavaScriptVBScriptSelect and copy to clipboard

if (123 != Pm.LicenceInfo(1))
{
Pm.MessageBox("Error", "Bad HW key !!", 0x10000000);
Pm.AppStop(1);
}

History:
Pm8.03.23: New functionality of LicenceInfo(10/11/12) method for detecting time that has passed since the last communication with the licence server.
PROMOTIC 9.0.17 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- LicenceInfo
 
 
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice