LicenceInfo - method of object Pm

Obtains information about licenses (in licence key) of the PROMOTIC application.
LicenceInfo(nWhat As Long) As Variant
x = Pm.LicenceInfo(nWhat)
nWhat(Long) Type of read values:
0 - License 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 license, then it returns number 0.

For the security of the development environment: see the setting The authorization of editing the application.

2 - License mode (no licence key, runtime, development). It doesn't read the new content of the licence key but it returns the values that were read earlier. It means that this property doesn't catch exchanging the licence key for another one or its removing.
3 - License mode (no licence key, runtime, development) with new reading of the licence key content. It means that this property catches licence key replacement or removal. Caution!This operation may be relatively time consuming under certain circumstances and therefore should not be executed very often (recommended frequency is a minute or longer).
10 - Time duration of communication malfunction with the licence server in seconds. Value 0 means that the last communication with the licence server was completed correctly. Value > 0 means that previous communication attempts (one or more) failed. Each successfull communication with the licence server resets the time to zero. In order to indicate the information regarding communication loss with the licence server in both local and web panels it is handy to use Data binding SP - Binding to the object Pm property binding to this method. Example of configurator content with binding $db.SP(0,"LicenceInfo(10)").
11 - Time in seconds after which the communication server license error occurs and a "notification" window for the operator is displayed (default 10m i.e. 600s).
12 - Time in seconds after which the application stops if the communication with the licence server continues to malfunction (by default, 48h i.e. 172800s).
23 - Maximum number of "PmWebClient" type clients. The information about the clients states can be found in the INFO system in the /COMM/ClientLicence flag.
24 - Currect count of connected "PmWebClient" type clients.
25 - Maximum count 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.
This method is not functional for Web panels in JavaScript language (and therefore it is not working in Web panels).
Whether the secured application is started only with the license (licence key) that includes user number 123. Into the PmRoot.onAppStartBegin event it is enough to enter, for example, the following script:
VBScriptSelect and copy to clipboard

If Not (123 = Pm.LicenceInfo(1)) Then
  Pm.MessageBox "Error", "Bad HW key !!", &H0+&H10000000
  Pm.AppQuit 1
End If
PROMOTIC 8.3.30 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
- 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