<< 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.
bool WLRegDisableKeyCurrentInstance(); |
function WLRegDisableKeyCurrentInstance():Boolean; stdcall; |
Public Declare Function WLRegDisableKeyCurrentInstance Lib "WinLicenseSDK.dll" () As Boolean |
[C#] [DllImport(WINLICENSE_SDK_DLL, CallingConvention = CallingConvention.StdCall)] public static extern bool WLRegDisableKeyCurrentInstance();
[Visual Basic] <DllImport("WinlicenseSDK.dll", CallingConvention:=CallingConvention.StdCall)> Public Shared Function WLRegDisableKeyCurrentInstance() As Boolean End Function |
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.