Home » Support » User Manual » Licensing system » Integrating to application » Step 1.8: Serial numbers in the black list

Step 1.8: Serial numbers in the black list

A serial number marked in VMProtect as “blocked” should not be accepted by the licensing system. When you will rebuild your application next time, VMProtect will add the hash of blacklisted serial numbers to the protected application. As a result, the licensing system of the application will decline these serial numbers in the future.

Firstly, lets minimize the contents of the main() function:

int main(int argc, char **argv)
        char *serial = "Xserialnumber"; // we set the serial number directly in the code, for simplicity

        int res = VMProtectSetSerialNumber(serial);

        return 0;

Now, run the program and make sure the licensing system do accept our serial number:

state = 0

Now, add this serial number to the black list of the licensing system. Add the following line to the ini-file:


And run the program again:


Should we inform a user that the serial number he or she enters is blacklisted? It is up to you. You can simply tell the serial number is incorrect or inform the user that the key is compromised. The licensing system simply informs the program about the fact of using the blacklisted serial number.

Next step