Automatic re-activation after IsGenuineEx fails

Hi, would you mind walking me through how I can resolve the following situation? I'm having a bit of trouble figuring it out.

1. User has activated the software and uses it normally.2. User then waits longer than the IsGenuineEx period to use the software again. For example, if the period is 90 days plus 14 day grace period, the user has waited 120 days.3. The user runs the software after this 120 day period, but they are not connected to the internet, so the software gets deactivated.4. What I would like to happen is that if the user now connects to the internet and runs the software again, they are re-activated automatically.

I'm just looking for exactly what functions I could call to make this possible (if it is indeed possible). It seems like I would need to store their previous product key somewhere via my own code, right? Because it's not stored by TurboActivate when deactivated?

Also, since the user wasn't online when the software was deactivated, the LimeLM server still shows it as being activated. How do I get around this?

Well, if you use IsGenuineEx the next time the user starts your app (if they're connected to the internet), then it will recheck the activation with the servers even if it's way past the grace period.

The only caveat is that if IsGenuineEx fails to contact the servers then it won't try again for the next 5 hours.

What you need to do is modify your code so that if IsGenuineEx fails you call IsActivated to see if there's a valid activation of the computer. And if so, show a prompt to the customer that says something along the lines of "You need to reverify with the activation servers now before you can continue to use AppX". And have "Recheck now" and "Exit app" buttons. The "recheck now" button will call the IsGenuine function.

Does that make sense?

Yes, it makes sense if they select "Recheck now" at that point. But what if they select "Exit app"?

Well... then you would exit your app immediately.

So the user knows what to do. They need to stop blocking the activation servers (or stop blocking your app from contacting the activation servers) so that they can continue to use your application.

What I meant is, how do I handle the case where they choose to exit the app, and then restart it later, either within the 5 hour period, or after that? Do I need to do anything extra?

No, you wouldn't need to do anything special. The next time the user runs your app IsGenuineEx() will be called first, it might succeed (in which case they'll be able to use your app immediately without any prompt), it might fail (in which case they'll be shown that new prompt you've added and have the option of retrying immediately).

Does that make sense?

Yes, I think so. I'll try it out. Thanks.