<< Click to Display Table of Contents >> Navigation: WinLicense > WinLicense SDK > Registration Functions > WLRegSmartKeyCheckW |
The WLRegSmartKeyCheckW validates a SmartActivate® key. This function should be called before installing a SmartActivate® key into the system.
From WinLicense 2.0, if you call this function the registration is performed on the fly and the application will go into registered mode if the key is correct. Notice that if the key contains expiration information, the application needs to be restarted (WLRestartApplication) 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.
This function should be used when a license has been generated with UNICODE functions.
bool WLRegSmartKeyCheckW( const wchar_t* pUserName, const wchar_t* pOrganization, const wchar_t* pCustomData, const wchar_t* pSmartKey ); |
function WLRegSmartKeyCheckW( pUserName:PWideChar; pOrganization:PWideChar; pCustomData:PWideChar; pSmartKey:PWideChar ):Boolean; stdcall; |
[C#] [DllImport(WINLICENSE_SDK_DLL, CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)] public static extern bool WLRegSmartKeyCheckW(string UserName, string Company, string CustomData, string SmartKey);
[Visual Basic] <DllImport("WinlicenseSDK.dll", CharSet:=CharSet.Unicode, CallingConvention:=CallingConvention.StdCall)> Public Shared Function WLRegSmartKeyCheckW(UserName As String, Company As String, CustomData As String, SmartKey As String) As Boolean End Function |
Parameters
pUserName
[in] Pointer to a null-terminated string that specifies the registration name for the SmartActivate® key to validate.
If this parameter is zero, it means that the SmartActivate® key does not have user name information.
pOrganization
[in] Pointer to a null-terminated string that specifies the organization name for the SmartActivate® key to validate.
If this parameter is zero, it means that the SmartActivate® key does not have organization information.
pCustomData
[in] Pointer to a null-terminated string that specifies the custom data for the SmartActivate® key to validate.
If this parameter is zero, it means that the SmartActivate® key does not have custom information.
pSmartKey
[in] Pointer to a null-terminated string that specifies the SmartActivate® key to validate.
Return Values
If the SmartActivate® key is valid, the return value is True.
If the SmartActivate® key is invalid, the return value is False.
See Also
WLRegSmartKeyInstallToRegistryW, WLRegSmartKeyInstallToFileW, WLGenLicenseSmartKey