revoke and trial days problems

I now have the basic functionality working on both mac and windows, but now have more detailed problems.

First, when I revoke a key, IsGenuineEx still returns a TA_E_ACTIVATE, rather than the expected TA_E_REVOKED. At first I thought this could be due to not checkign with the servers, so I set opts.nDaysBetweenChecks = 0; but got same behavior.

Next, it sets a trial period to 30 days, regardless of how I initialize trialDays before the call hr = TrialDaysRemaining(TA_GUID, &trialDays);At first I thought this was because my test system had already started a trial and perhpas the idea is to not shorten it on the user, but when tried it on a virgin system, even though I had trialDays as 0 it still gave a 30 day trial.

Once again I am sure I have done something wrong, help is appreciated.

Thank you,Andy

If you get TA_E_ACTIVATE then it's because you're not activated. It's really that simply. Which means you'll never get a TA_E_REVOKED response. Why? Because you're not activated.

Note: using TA 3.x, don't disable network adapters to "test no internet connectivity". This shuts off power to the device, thus changing the fingerprint.

In TA 4.0 (out soon) we fix this user-behavior by working around it.

If you want to test "no internet connectivity" then:

1. On Wireless card: disconnect from the network. There's a button for it in the Wifi list in Windows.2. On Wired connection: unplug the cable.

>> "Next, it sets a trial period to 30 days, regardless of how I initialize trialDays before the call hr = TrialDaysRemaining(TA_GUID, &trialDays);"

Did you call UseTrial() first? My guess is not. Or you didn't read the error code from UseTrial().

Re: revoked, does that mean that TA_E_REVOKED can never be detected? If it can, please outline the conditions under which it can be detected.

Re: trial days: I am using the example code, which checks for hr == TA_OK after UseTrial. More specifically, here is the code:uint32_t trialDays = 0;hr = UseTrial(TA_USER);

if (hr == TA_OK) { // Get the number of trial days remaining. hr = TrialDaysRemaining(TA_GUID, &trialDays);

if (hr == TA_OK) { printf("Trial days remaining: %d\n", trialDays);

trialDays then has a value of 29 regardless of what it waas before the call to UseTrial.trial

>> "Re: revoked, does that mean that TA_E_REVOKED can never be detected? If it can, please outline the conditions under which it can be detected."

No, it means the customer actually has to be activated with the key first. IsGenuineEx() was telling you that the computer wasn't activated with *any* valid key for your product. Hence, TA_E_ACTIVATE. It's telling you exactly how to solve the problem.

>> "trialDays then has a value of 29 regardless of what it waas before the call to UseTrial."

Because in TA 3.x it rounds down to the next whole day (except when there's less than a day). In TA 4.x we've fixed it so that it rounds up to the whole day (so if there's 29 days and 10 seconds of trial left, it will day there's 30 days. And then, if you make the same call 11 seconds later, it will say 29 days_)/

On the trial days track: you misunderstand my question. The roudnign down is no problem. The issue is, that it is always based off of 30 days - perhaps I misunderstand how to change to to somethign different than 30 days. My understandign from the sample code is that one sets trialDays before the UseTrial call. But it doesn't seem to matter what I set that to. More directly: how does one set the trial period?

Oh, ok. That's done in LimeLM. You edit the version, change the trial length, click save. Then you re-download the TurboActivate.dat and include it with your app.

Very good. I now have both trials and revocation working.

Except I do have one corner case to ask about: due to the way revocation works, it seems that a person who is revoked can only be detected once, after that, they aren't activated, so they get a trial. But presumably, we would not want to give a trial to someone we revoked... is my question clear? Am I missing something?

Yep, that's right. If you revoke a customer they will no longer be activated. However, presumably it will be more than the trial length that you revoke a key (so effectively the trial will be expired and thus they'll no longer be able to use your app).