<< Click to Display Table of Contents >> Navigation: WinLicense > WinLicense SDK > Miscellaneous Functions > WLRestartApplication |
The WLRestartApplication function closes the current application and restarts it again. This function should be called when a text key or SmartActivate® key has been installed (using WLRegInstallSmartKeyToFile, WLRegInstallSmartKeyToRegistry, WLRegInstallTextKeyToFile, WLRegInstallTextKeyToRegistry) and the application needs to be restarted to finish the WinLicense registration process.
From WinLicense 2.0, if you call WLRegSmartKeyCheck or WLRegNormalKeyCheck, the registration is performed on the fly and the application will go into registered mode if the key is correct. Notice that if the SmartKey or Text Key contains expiration information, the application needs to be restarted in order to start the expiration process. If no expiration is inserted in the license, then the registration process is fully performed without having to restart the application.
bool WLRestartApplication (void); |
function WLRestartApplication ():Boolean; stdcall; |
Public Declare Function WLRestartApplication Lib "WinLicenseSDK.dll" () As Boolean |
[C#] [DllImport(WINLICENSE_SDK_DLL, CallingConvention = CallingConvention.StdCall)] public static extern bool WLRestartApplication();
[Visual Basic] <DllImport("WinlicenseSDK.dll", CallingConvention:=CallingConvention.StdCall)> Public Shared Function WLRestartApplication() As Boolean End Function |
Parameters
This function has no parameters.
Return Values
If the function succeeds, the application is restarted.
If the function fails, the return value is zero.
Remarks
This function has not effect in unprotected state for .NET applications.