KEYnote 48 English - Fall/Winter 2024 | Page 10

PROTECTION

Event Handling in Protected Applications

CodeMeter Protection Suite enables simple encryption of applications , but what happens if a license is missing ? With the CPSEvents interface , error messages can be customized , and additional functions like license selection or error handling can be integrated .
Thanks to the various AxProtector tools within CodeMeter Protection Suite , encrypting an application is quick and easy ; even beginners can do it in just a few minutes . Technically , everything runs smoothly as long as the required license for your application is available . The application starts as usual , perhaps with a slight delay , but the user doesn ’ t notice any difference . But what happens if the license is not available ?
In that case , a CodeMeter error message will appear . However , this message often differs from the usual application error messages , which may cause confusion for users . Clarity and a consistent appearance are crucial to ensure that CodeMeter is recognized as an integral part of the delivered software .
For many years , Wibu-Systems has offered the UserMessage interface for all versions of AxProtector . This allows error messages to be displayed in different languages by simply modifying . ini files . A custom background graphic can also be added , ensuring that the error message visually fits the design of your application .
As an alternative to the standard UserMessage library , which is limited to displaying on Windows , there is the option to create your own DLL . This enables you to integrate additional functionalities , such as displaying all available licenses on the network for user selection or assigning licenses to the same CmContainer for applications with multiple components .
CPSEvents in AxProtector NC The new generation of AxProtector tools , marked with “ NC ” for “ Native Core ,” uses a similar but modernized mechanism . In this case , CodeMeter Protection Suite Runtime ( CPSRT ) handles license verification and decryption within a tamper-resistant environment . This enables protection for scripting languages and also provides optimized management of multiple concurrently running protected applications .
In CPSRT , all error handling is centrally managed . If an error occurs , CPSRT calls the corresponding CPSEvents library via the CPS- Events interface . Here again , you have two options :
Complete Package Wibu-Systems provides a ready-made CPS- Events library that displays graphical dialogs across platforms . These dialogs are rendered as HTML pages using a minimal browser ( Webview ). On Linux , the libraries libgtk-3 and libwebkit2gtk-4 must be installed on the system to enjoy this functionality .
AxProtector configuration
Options : TrapGeneration : true RuntimeCheck : Enabled : true LockLicense : true DebuggerCheck : true ExternalToolCheck : true AllowedIgnores : 3
CpsEvents : CopyDefault : true GuiConfig : ./ guiconfig . yaml
Licenses : Name : 0-1 Type : CodeMeter FirmCode : 6000010 ProductCode : 201000
10