nWhat | (Long) Type of read values:
0 - Licence number (number of licence key).
1 - Unique user number (PmUserNumber). It is used to the security of launching the runtime of the PROMOTIC application, see Example. If the user number is not included in the licence, then it returns number 0.
For the security of the development environment: see the "Management of application designers in the development environment" configuration window. 2 - Licence mode (demo, runtime, development). It does not read the new content of the licence 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.
0 - the demo licence, for demonstration purposes only. It cannot be used to run real applications.
3 - (obsolete) Calling priority licence refresh (asynchronous operation). This operation is now irrelevant because the system initiates licence refresh automatically every 10 minutes. Lost licence is detected by operation 10 (the value of the nWhat parameter is 10). The return 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. The > 0 value 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 - Pm object property" data binding to this method. Example of the configurator content with binding $db.SP(0,"LicenceInfo(10)"). 11 - Time in seconds of the 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.
26 - Current count of connected clients of the "PmDataClient" and "PmWebClient" type. This information can be useful for example for monitoring of Web activity. |
---|
if (123 != Pm.LicenceInfo(1))
{
Pm.MessageBox("Error", "Bad HW key !!", 0x10000000);
Pm.AppStop(1);
}