Differentiate between an internet error and a true NotGenuine

I'm trying to hash out the different cases that can occur when calling IsGenuine(90,14, false), and I'm having trouble differentiating between several different errors.

Lets start with the case that the user has activated via the internet (not offline using the special activation files). As I understand it, if the program passes the 90 days since it last checked with the server, but has not passed the grace period, then if the computer is not connected to the internet then IsGenuine(90,14, false) returns InternetError. If instead the grace period has been passed, and the computer still cannot connect to the internet, then IsGenuine(90,14, false) would return NotGenuine. If this is the case, then how do I differentiate between a true internet connection issue (the user just passed the grace period) and a revoked/deleted product key?

Basically, if the issue is just an internet connection issue, then I would give the user a message to that effect. If the issue is something more serious (revoked/deleted key), then I could tell the user that and then open TurboActivate.exe to allow them to try and resolve the issue by the various methods available there.

Along with all this, can I somehow know how long it has been since the last server check occurred? Or how much longer in the grace period there is? This might help some in removing the ambiguity of the response from IsGenuine.

Lets start with the case that the user has activated via the internet (not offline using the special activation files). As I understand it, if the program passes the 90 days since it last checked with the server, but has not passed the grace period, then if the computer is not connected to the internet then IsGenuine(90,14, false) returns InternetError.

That's mostly correct. I say mostly, because during the 90-day period IsGenuineEx(...) never contacts the server (because you told it not to for 90 days). So, yes, when the 90-days has passed, and if the IsGenuine() function fails to contact the servers, then "InternetError" will be returned.

If instead the grace period has been passed, and the computer still cannot connect to the internet, then IsGenuine(90,14, false) would return NotGenuine.

Correct.

If this is the case, then how do I differentiate between a true internet connection issue (the user just passed the grace period) and a revoked/deleted product key?

Use the IsActivated() function. So if, IsGenuineEx() returns TA_FAIL (for C++) or NotGenuine (for most other languages) then call IsActivated(). If IsActivated() says you're still activated, then that means that IsGenuine() was returning NotGenuine because the 90 days + 14 days has passed and it could never re-verify with the servers.

Does that make sense?

I think it makes sense. I'm working in C#. Just to confirm- you are saying that after IsGenuine(90,14, false) is called (assume the license was revoked prior), then the logic behind IsActivated() is updated so that it properly to return false. Correct?

Is all of this logic the same in the case that the license was originally activated using the offline feature? Let's assume that I always call IsGenuine as IsGenuine(90,14, false).

I think it makes sense. I'm working in C#. Just to confirm- you are saying that after IsGenuine(90,14, false) is called (assume the license was revoked prior), then the logic behind IsActivated() is updated so that it properly to return false. Correct?

Yes, because they will no longer be activated.

Is all of this logic the same in the case that the license was originally activated using the offline feature? Let's assume that I always call IsGenuine as IsGenuine(90,14, false).

Yes, because in the case of offline activations IsGenuineEx() will never contact the activation servers.

But wait, I thought that if I specified "false" as the 3rd parameter to IsGenuine (Note that this is the C# version), then it would check the server at the specified intervals, even if the activation was originally made offline. Or maybe that's not right...

Could you explain the last two parameters of the function in more detail to me? The documentation is not as clear as I think it could be:

<param name="skipOffline">If the user activated using offline activation (ActivateRequestToFile(), ActivateFromFile() ), then with this option IsGenuineEx() will still try to validate with the LimeLM servers, however instead of returning <see cref="IsGenuineResult.InternetError"/> (when within the grace period) or <see cref="IsGenuineResult.NotGenuine"/> (when past the grace period) it will instead only return <see cref="IsGenuineResult.Genuine"/> (if IsActivated()). If the user activated using online activation then this option is ignored.</param>

<param name="offlineShowInetErr">If the user activated using offline activation, and you're using this option in tandem with skipOffline, then IsGenuineEx() will return <see cref="IsGenuineResult.InternetError"/> on internet failure instead of <see cref="IsGenuineResult.Genuine"/>. If the user activated using online activation then this flag is ignored.</param>

Reading the documentation literally, then here are the possible states (I just realized that this is not the same as my understanding as described above):

1. skipOffline = false, offlineShowInetErr = false/true: In this case, any offline activations are not checked with the server, ever.

2. skipOffline = true, offlineShowInetErr = false: In this case, any offline activations ARE checked with the server, but returns "IsGenuineResult.Genuine" if there is an internet error. If it continues to not connect to the internet after the grace period, then it will attempt to connect each and every time the program is opened until it connects successfully (but always returns "IsGenuineResult.InternetError"). It could still return "IsGenuineResult.NotGenuine" because of a successfully connecting to the server, and discovering the license has been revoked or deleted.

3. skipOffline = true, offlineShowInetErr = true: In this case, any offline activations ARE checked with the server, and returns "IsGenuineResult.InternetError" if there is an internet error. Never will return "IsGenuineResult.NotGenuine" because of going over the grace period and still not being able to connect to the internet. If it continues to not connect to the internet after the grace period, then it will attempt to connect each and every time the program is opened until it connects successfully (but always returns "IsGenuineResult.InternetError"). Could return "IsGenuineResult.NotGenuine" because of a successfully connecting to the server, and discovering the license has been revoked or deleted.

Is my interpretations about the method correct?

But wait, I thought that if I specified "false" as the 3rd parameter to IsGenuine (Note that this is the C# version), then it would check the server at the specified intervals, even if the activation was originally made offline. Or maybe that's not right...

Oh, sorry, you're right.

1. skipOffline = false, offlineShowInetErr = false/true: In this case, any offline activations are not checked with the server, ever.

No, they're always checked with the server regardless of whether the activation was done offline or not.

2. skipOffline = true, offlineShowInetErr = false: In this case, any offline activations ARE checked with the server, but returns "IsGenuineResult.Genuine" if there is an internet error. If it continues to not connect to the internet after the grace period, then it will attempt to connect each and every time the program is opened until it connects successfully (but always returns "IsGenuineResult.InternetError"). It could still return "IsGenuineResult.NotGenuine" because of a successfully connecting to the server, and discovering the license has been revoked or deleted.

That's mostly correct except for "but always returns 'IsGenuineResult.InternetError'". It will always return Genuine -- it will never show InternetError in this case.

3. skipOffline = true, offlineShowInetErr = true: In this case, any offline activations ARE checked with the server, and returns "IsGenuineResult.InternetError" if there is an internet error. Never will return "IsGenuineResult.NotGenuine" because of going over the grace period and still not being able to connect to the internet. If it continues to not connect to the internet after the grace period, then it will attempt to connect each and every time the program is opened until it connects successfully (but always returns "IsGenuineResult.InternetError"). Could return "IsGenuineResult.NotGenuine" because of a successfully connecting to the server, and discovering the license has been revoked or deleted.

Yes.

> 1. skipOffline = false, offlineShowInetErr = false/true: In this case, any offline> activations are not checked with the server, ever.

So then for this case, TurboActivate ignores the fact that the user activated offline or online: If IsGenuine(90,14,false) fails to connect to the server, then it returns InternetError prior to the end of the grace period and returns NotGenuine if after the end of the grace period.

The other cases make sense now.

OK, thanks!