Home » Support » User Manual » Licensing system » Integrating to application

Integrating to application

In the several steps described below we will create a test application that queries the licensing system: provides serial numbers to it, receives the status of a serial number and its contents. On the first stage, we use the license system in the test mode; one the second stage we use it as it would be used in actual practice.

Work modes of the licensing system

Building protection always goes through two main steps: development and release. As for licensing, at first you create an application, integrate protection into it, then add checks and functional limitations. And only after thorough testing you can make the product available to users and begin the second stage. Testing of a protected application is a complex process, because you need to make sure all checks and conditional jumps operate correctly. Making “real” serial numbers for all possible test cases is inconvenient. That is why the licensing system offers the “developer mode” (AKA “test mode”) as well. In this work mode, no protection is applied to the app, and reaction of the system to supplied serial numbers is adjusted in the configuration file. When the application is free from bugs and it correctly works with the licensing system, VMProtect replaces the “test” licensing module with the real one that do perform real serial number checking. This is done when the application is protected, so you can’t avoid this step by mistake.

Stage 1: Test mode

In the test mode, all reactions of the licensing system (statuses and data it returns) to supplied serial numbers is described in the configuration file. The file is called VMPLicense.ini and should be located in the working folder of the application. In 10 steps provided below we will go from creating the simplest application to full-featured use of the licensing system in the test mode with hardware locking and limiting the period of free upgrades.

Stage 2: Real mode

In the real mode VMProtect licensing system puts a special licensing module to the protected application. This module carries out the same functions as the test one in the SDK, but works with contents of a serial number instead of the configuration ini-file. The next five steps illustrate the process of protecting a simple application with a full-featured protection based on VMProtect and the licensing system.

Additional information

Values of all bit flags, structure formats and function call parameters can be found in the Licensing system API section of this help file. Use this section as a reference, while Steps provided above help to easily implement a typical ready-to-use protection.