WLRegDisableKeyCurrentInstance

<< Click to Display Table of Contents >>

Navigation:  WinLicense > WinLicense SDK > Registration Functions >

WLRegDisableKeyCurrentInstance

The WLRegDisableKeyCurrentInstance function disables the current installed key for the specific application which calls WLRegDisableKeyCurrentInstance. That is, if you have 2 versions of your application and one of them calls WLRegDisableKeyCurrentInstance, then the current installed license will not be valid for that specific instance (the "MsgID42 : License disabled in current instance" from Customized Dialogs will be displayed). Your other protected version will work fine with the current installed license.

 

A typical case example is when you sell a product and your customers need to pay for a subscription after some time. So, your customers will have access to your latest release versions. When the subscription expires for a customer (for example, you store the subscription expiration date in the "Custom Data" inside a license), you call WLRegDisableKeyCurrentInstance and the license will not be valid for that specific version which called that function. If your customer runs previous versions of your application, the license will be recognized and your customer can keep using previous versions of your application, but he won't be able to run the version which called WLRegDisableKeyCurrentInstance.

Click to expand/collapseShow C/C++ function definition
Click to expand/collapseShow Delphi function definition
Click to expand/collapseShow Visual Basic Native function definition
Click to expand/collapseShow .NET function definition

 

Parameters

 

This function has no parameters.

 

 

Return Values

 

If the license was successfully disabled, the return value is True.

 

If the function fails, the return value is False.