<< Click to Display Table of Contents >> Navigation: WinLicense > WinLicense SDK > Registration Functions > WLRegSmartKeyCheck |
The WLRegSmartKeyCheck 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.
bool WLRegSmartKeyCheck( const char* pUserName, const char* pOrganization, const char* pCustomData, const char* pSmartKey ); |
function WLRegSmartKeyCheck( pUserName:PAnsiChar; pOrganization:PAnsiChar; pCustomData:PAnsiChar; pSmartKey:PAnsiChar ):Boolean; stdcall; |
Public Declare Function WLRegSmartKeyCheck Lib "WinLicenseSDK.dll" ( ByVal pUserName As String, ByVal pOrganization As String, ByVal pCustomData As String, ByVal pSmartKey As String ) As Boolean |
[C#] [DllImport(WINLICENSE_SDK_DLL, CallingConvention = CallingConvention.StdCall)] public static extern bool WLRegSmartKeyCheck(string UserName, string Company, string CustomData, string SmartKey);
[Visual Basic] <DllImport("WinlicenseSDK.dll", CallingConvention:=CallingConvention.StdCall)> Public Shared Function WLRegSmartKeyCheck(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
WLRegSmartKeyInstallToRegistry, WLRegSmartKeyInstallToFile, WLGenLicenseSmartKey