Can we control the offline licensing period while creating the product keys?

Hello,We have a customer whose servers are not connected to the outside world using internet. So, for this customer we are giving an option of offline licensing.

So my question is can we control the time period for which the license can be used on that machine after which the software deactivates automatically without connecting to the limelm servers ? If that feature is available please let me know on how can that be achieved ?

Thanks!

Yep, use TA_IsGenuineEx() without the TA_SKIP_OFFLINE flag. See any one of the examples: https://wyday.com/limelm/help/using-turboactivate/

So what is the behavior of A_IsGenuineEx() without the TA_SKIP_OFFLINE flag? Can you elaborate what happens ?

This is covered in TurboActivate.h:

/* If the user activated using offline activation (TA_ActivateRequestToFile(), TA_ActivateFromFile() ), then with this flag TA_IsGenuineEx() will still try to validate with the LimeLM servers, however instead of returning TA_E_INET (when within the grace period) or TA_FAIL (when past the grace period) it will instead only return TA_OK (if machine has a valid activation).

If you still want to get the TA_E_INET error code, without deactivating after the grace period has expired, then use this flag in tandem with TA_OFFLINE_SHOW_INET_ERR.

If the user activated using online activation then this flag is ignored.*/#define TA_SKIP_OFFLINE ((uint32_t)1)

Let me rephrase.

If we skip the "TA_SKIP_OFFLINE" flag how will it check the stored product key's value to estimate the number of days left for the offline license? Because when i create the product key I will set the value of "monthly_sub" to an end date (i.e when the offline key will expire) Should we manually check against this monthly_sub value then and deactivate the product ourselves with TA_Deactivate() ?

If so please let me know else let me know how this can be achieved

Thanks.