Best practice if a user has never used trial without activating the trial

Hi,

I am looking for an advice on how to check if a user’s machine has never used trial (AKA: new user), so that on our UI we show “Start Trial” button for them to activate the trial.

When LexActivator.IsTrialGenuine() returns LA_FAIL,

  1. does LexActivator.GetTrialExpiryDate() return 0 mean this a new user and safe to show “Start Trial” button to call LexActivator.ActivateTrial()?
  2. is it a better to use LexActivator.GetTrialId() and catch LexActivatorException with message “Unknown error” to determine this is a new user?

Thanks in advance,
Mingbo

Hi @Mingbo,

Thank you for reaching out.

The IsTrialGenuine() function returning LA_FAIL indicates that the trial has not been activated on the machine. Therefore, when this code is returned, it is appropriate to display the “Start Trial” button and proceed with calling the ActivateTrial() function.

Please note the following:
When the ActivateTrial() function is invoked for the first time, it activates the trial on the machine and stores the activation data locally on the machine’s disk, simultaneously registering the activation on the server. In case the trail has expired and the local activation data is removed from the machine somehow, any attempts to activate the trial again will return LA_EXPIRED (i.e. ActivateTrial() function will return LA_EXPIRED), as the trial has already expired.

For any additional assistance, please feel free to reach out to our support channel via support@cryptlex.com.