View Full Version : Using borrowing features with lc_set_attr

03-26-2010, 06:19 AM

I'm using the Flex API to check out borrowed licenses and I am slightly confused with the usage of lc_set_attr when borring licenses. I have:

lc_set_attr(lm_job, LM_A_BORROW_EXPIRE, (LM_A_VAL_TYPE)"26-mar-2010:10:45");

and I check out a license, only for it to not show up on lmborrow -status (or registry) and shows up on my license server as borrowed. But if I set up LM_BORROW using lmborrow <all> <date> <time> I find I don't need to set the attributes (using lc_set_attr) and it will show up in lmborrow -status and server.

So my main question is, is setting the attributes neccesary when borrowing licenses?

p.s. is there a (tidy) way to set LM_BORROW using Flexnet? I have some horrible C code to set it atm.


03-29-2010, 04:55 PM
That's odd; if I add the same thing to lmflex.c---
lc_set_attr(lm_job, LM_A_BORROW_EXPIRE, (LM_A_VAL_TYPE)"30-mar-2010");---and check out a borrowable feature B1, lmborrow -status shows the borrow information:

C:\i86_n3-11.8.0\i86_n3> lmborrow -status

lmborrow - Copyright (c) 1989-2009 Flexera Software, Inc. All Rights Reserved.
Vendor Feature Expiration
______ ________ __________

demo B1 30-Mar-10 23:59It shouldn't be necessary to explicitly set LM_BORROW from code, but running lmborrow is a valid alternative...