PDA

View Full Version : check out license based on Entitlement ID or SN



cummins
10-27-2009, 10:07 PM
I need to check out a license based on either Entitlement ID or SN (Serial Number)
since I have multiple activations which all have same feature in local trusted storage.

Is it possible to do?

I tried to check out a license using "lc_checkout" but it requests a license for a feature.
For above case, it checks out the last activated license. I should be able to check out other licenses as well...

Thanks,

RobertDickau
10-30-2009, 07:15 PM
You might look into creating a "checkout filter" in your licensed app's code. A checkout filter enables you to test candidates for checkout based on the feature's CONFIG structure, which contains the feature's name, version, VENDOR_STRING value, SN value, etc.; based on the CONFIG contents, you can accept or reject each candidate.

Searching the docs for "checkout filter" and "LM_A_CHECKOUTFILTER" will give more information and examples.

cummins
11-10-2009, 09:17 PM
I created a "checkout filter", and could checkout based on the feature's SN value since feature's CONFIG structure have that information.

But, the feature's CONFIG structure does not have the Entitlement ID. How can I checkout based on the Entitlement ID?

RobertDickau
11-11-2009, 11:10 AM
The FLEXible API used for checking out licenses and so on doesn't see any fulfillment record details---entitlement ID, fulfillment ID, etc.---so there's no straightforward way to handle this; common practice seems to be to put the entitlement ID in VENDOR_STRING or other keyword value that is visible to CONFIG and the rest of the FLEXible API.

cummins
11-12-2009, 12:21 PM
Yes, I can put the entitlement ID in NOTICE, and use it as filter. :)

I want to make sure if it checks out the last activated license If a user have multiple activations which all have same feature.
Please let me know how it works.

Thanks,

RobertDickau
11-12-2009, 07:03 PM
I'm not sure the "sort order" within trusted storage for fulfillment records is defined or documented, so filtering by some known attribute is probably a safer approach.