<< Click to Display Table of Contents >> Navigation: WinLicense > WinLicense SDK > Registration Functions > WLRegDisableCurrentKey |
The WLRegDisableCurrentKey function marks the current license key as stolen or invalid. This function can be used when an application, with internet access, detects that the current key has been stolen. Winlicense will block the license key in runtime and will prevent the application from running again with that license key.
bool WLRegDisableCurrentKey ( int DisableFlags ); |
function WLRegDisableCurrentKey ( DisableFlags:Integer ):Boolean; stdcall; |
Public Declare Function WLRegDisableCurrentKey Lib "WinLicenseSDK.dll" ( ByVal DisableFlags As Integer ) As Boolean |
[C#] [DllImport(WINLICENSE_SDK_DLL, CallingConvention = CallingConvention.StdCall)] public static extern bool WLRegDisableCurrentKey(int DisableFlags);
[Visual Basic] <DllImport("WinlicenseSDK.dll", CallingConvention:=CallingConvention.StdCall)> Public Shared Function WLRegDisableCurrentKey(DisableFlags As Integer) As Boolean End Function |
Parameters
DisableFlags
This parameter specifies the status to set up in the current license key.
The current version of WinLicense allows the following values for DisableFlags:
•wlMarkStolenKey (0) to mark a key as stolen.
•wlMarkInvalidKey (1) to mark a key as invalid.
Return Values
If the function succeeds, the return value is True.
If the function fails, the return value is False.
Remarks
When you call WLRegDisableCurrentKey, basically it bans the specific user information ("User Name/Company/Custom Data") for your application. If you re-generate a new license with the same user information, it will be still invalid.
You have to re-generate a new license but changing any user information (like for example, insert/remove some extra chars in the "Custom Data" field)
See Also