CheckRegistration macro

<< Click to Display Table of Contents >>

Navigation:  WinLicense > SecureEngine® Macros >

CheckRegistration macro

The CHECK_REGISTRATION macro allows you to check if your application has been registered with a valid license key. You can also know if your application is registered via WLRegGetStatus. The CHECK_REGISTRATION macro can be used as a double check to make sure that your application has not been tampered.

 

NOTE: The current version of SecureEgine® does not support this macro for .NET languages or Visual Basic applications.

 

The CHECK_REGISTRATION macro can be called from inside other macros. In fact, it's highly recommend to call the CHECK_REGISTRATION macro from inside VM macros.

 

The CHECK_REGISTRATION macro has a special syntax:

 

CHECK_REGISTRATION (user_variable, user_value)

 

Where "user_variable" is any local or global variable in the application and "user_value" is any immediate value (constant value). The way that it works is the following:

 

The CHECK_REGISTRATION macro is called.

 

SecureEngine takes control of the processor and make special checks to know if your application is correctly registered.

 

If your application is correctly registered, SecureEngine sets "user_variable" equal to "user_value".

 

If the application is not registered, SecureEngine does not set "user_variable". You should take care of initializing "user_variable" to something else from "user_value".

 

SecureEngine returns control to the protected application. The protected application should check the value of "user_variable" and execute the desired action if the application is not registered.

 

Click to expand/collapseShow C/C++ Macro Usage
Click to expand/collapseShow Delphi Macro Usage