UseTrial exception

I am now integrating v4 with my app, and have noticed some change in behaviour with UseTrial, so I just wanted to confirm best practice here:

In the past, I have had to use a slightly ugly construct where I first call UseTrial with TA_SYSTEM and - if this throws an exception - I call again with TA_USER. This was, I believe (it was a while ago now), due to users without admin rights.

Now I have updated the code to call UseTrial with TA_SYSTEM | TA_VERIFIED followed by the same for TA_USER.

1. Are these steps still required? Any way of combining TA_SYSTEM and TA_USER into one call?

2. On my test machines, the call to UseTrial now throws an exception telling me that the trial has expired. This never used to happen - I would just follow up the UseTrial call with a call to TrialDaysRemaining, which would return 0. Is calling UseTrial and checking for the appropriate exception now the way to test for trial expiration? Or is there another way? I notice that if I catch this exception and then call TrialDaysRemaining, I then get a "must call use trial" exception.

3. What happens to verified trials on machines that have previously had non-verified trials? It would seem they just flag as expired, but I want to double check.

thanks,Matt

>> "1. Are these steps still required? Any way of combining TA_SYSTEM and TA_USER into one call?"

Nope. If you want to fallback from TA_SYSTEM to TA_USER, you can certainly do that by catching the PermissionException.

>> "2. On my test machines, the call to UseTrial now throws an exception telling me that the trial has expired. This never used to happen "

That's correct. It's new behavior for verified trials. Verified trials are a lot different "beneath the surface" and marginally different "above the surface".

>> "Is calling UseTrial and checking for the appropriate exception now the way to test for trial expiration?"

No, it's just one way. If that throws the TrialExpired exception then you know the trial has expired. If it doesn't, then that doesn't mean the trial hasn't expired, it just means now you need to check TrialDaysRemaining().

>> "3. What happens to verified trials on machines that have previously had non-verified trials? It would seem they just flag as expired, but I want to double check."

They continue wherever they left off. So, if they're expired, then the verified trial is added to your account, you'll be able to see exactly when it started and when it expired.