No Trial Period -- (PermissionException, TA_E_PERMISSION)Solved

Hi,

I'm currently testing LimeLM.I will need it on Mac and Windows. I'm using Xojo and your example.So far, testing with 4.02 and 4.0.3 just now, every time I get a 0 day trial period ( tested on 2 Mac ).

I set up a new app ( LimeTestApp ) with a 4 days trial period , download the TurboActivate.dat and changed the Version GUID in the exaple.

What did I miss ?

Thanks, Fred

Hey Fred,

1. Did you use UseTrial()?

2. Is it throwing an exception? (don't swallow exceptions).

3. Are you using verified trials or unverified trials?

4. If you're using verified trials, is there a verified trial listed in your account (Click "trials" in your LimeLM dashboard to view all verified trials and trial extensions).

5. Do you have a trial length other than 0 set in LimeLM?

Thanks for your answer, Sam.

It's Your example, so I suppose everything is correct !

1. I can see that the method "ShowTria" does use UseTrial(trialFlags) with

trialFlags = TA_SYSTEM or TA_VERIFIED_TRIAL2. Yes it does throw an exception : Try.... Case TA_E_PERMISSION Raise New PermissionException

3-4. I don't see anything related to the OS I'm working on .

5. Yes, 4 days

Thanks,Fred

2. Yes it does throw an exception : Try....Case TA_E_PERMISSIONRaise New PermissionException

Ok, that's the problem. You're using TA_SYSTEM, and the error will tell you that TurboActivate store the files system-wide (so all users can use the same data).

You can solve this problem one of 2 ways: use TA_USER, or the first time you use a function that requires either TA_USER/TA_SYSTEM make sure your app is running "elevated" or as an admin. So, when you call TA_UseTrial() or TA_CheckAndSavePKey() with TA_SYSTEM make sure you're running your app as an admin the first time you make this call.

Or, make these call within your installer (because presumably it will be running as an admin).

It's up to you which choice you want to make. There are trade-offs between TA_USER and TA_SYSTEM.

Of Course, Sam !

I should have guessed it 😳

Strange thing is that when debugging on a VM using Xojo Remote Debugger, I got the trial period, on Snow Leopard for example or WIindows 7.

Have got a reference document concerning the difference between TA_USER and TA_SYSTEM ?

Thanks, Fred

No, we don't have any online documents talking about the difference between TA_USER and TA_SYSTEM. We have comments in every programming language that supports comments on constants (which, ironically Xojo is one of the only languages that doesn't allow that).

The best reference is the TurboActivate.h file in the "API\C" folder.

The only real difference between TA_USER and TA_SYSTEM is where the files are stored: either on a per-user basis (thus, no TA_E_PERMISSION error will ever be returned) or on a system-basis (i.e. all users will have access to the data).

As mentioned in TurboActivate.h when you use TA_SYSTEM on either TA_UseTrial() or TA_CheckAndSavePKey() you'll need admin permission the first time you call the function with TA_SYSTEM. However, after that, you don't need admin permission. The first time you call those functions with TA_SYSTEM, TurboActivate sets everything up so all users have access to the data.

Thanks, Sam, I'll have a look at TurboActivate.h file

Many thanks for your time,Best,Fred

No problem, Fred. I'm glad to help.