<< Click to Display Table of Contents >>
Navigation: WinLicense > WinLicense SDK > Miscellaneous Functions >
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
[DllImport(WINLICENSE_SDK_DLL, CallingConvention = CallingConvention.StdCall)]
public static extern bool WLRestartApplication();
Public Shared Function WLRestartApplication() As Boolean
This function has no parameters.
If the function succeeds, the application is restarted.
If the function fails, the return value is zero.
This function has not effect in unprotected state for .NET applications.