cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Willag
Level 4

Trusted Storage : Acquire/Return AvailableAcquisitionCount

Jump to solution

Hi,

I am blocked on the following use case:

A TrustedStorage file is present on my computer with the feature <"name=F1", "version=1.0", "count=1").

Step 1 :
I launch my software a first time.
It loads the contents of the TrustedStorage file.
--> licensing.LicenseManager.AvailableAcquisitionCount("F1", "1.0").Count = 1
I acquire the "F1" feature: <licensing.LicenseManager.Acquire("F1", "1.0", 1);>.
--> licensing.LicenseManager.AvailableAcquisitionCount("F1", "1.0").Count = 0
The result seems consistent.
I don't close the software!

Step 2 :
I launch my software a second time (I remind you that the first one is not closed).
It loads the contents of the TrustedStorage file.
--> licensing.LicenseManager.AvailableAcquisitionCount("F1", "1.0").Count = 1
I acquire the "F1" function: <licensing.LicenseManager.Acquire("F1", "1.0", 1);>.
<licensing.LicenseManager.AvailableAcquisitionCount("F1", "1.0").Count = 0
Is this normal?

I don't understand why the result of "AvailableAcquisitionCount" is "1"?
Why can I acquire the function again when the first launch already acquired it?
I don't understand why the result is "1"? Shouldn't the first launch have locked the acquisition of this feature ?
Maybe I forgot to make a setting in my license model?

Thanks for your help

William

0 Kudos
(1) Solution
jberthold
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi @Willag ,

What you are seeing is expected behavior.  The license count is enforced within the same process only.   A new process will have access to the full count of licenses in trusted storage.

Thx,

Jim

View solution in original post

(1) Reply
jberthold
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi @Willag ,

What you are seeing is expected behavior.  The license count is enforced within the same process only.   A new process will have access to the full count of licenses in trusted storage.

Thx,

Jim