View Full Version : Understanding required for Checkin() and Checkout()

Apoorv Jain
12-07-2006, 12:54 AM
Need some understanding on this...
For testing purpose, I have created a form which has a text field and 2 buttons for checkout and checkin.
When I run my form and input my feature name in the text field and checks out the feature, it is success.
(License is say for 4 users). I now without closing this window press Checkout button 3 more times i.e. in total
I've performed 4 checkouts now. On 5th press, I get an error. Till this point everything is fine.
Now I click on Checkin button. It should free up one license so that the next time I click checkout button, I can checkout
1 more freed License. It gives me error that all licenses are checked out being the fact that I checked in my 1 License :mad: .

If I open 4 instances of my form and perform checkout and checkin, I can do perfectly fine. But with 1 instance if I perform
maximum allowed checkouts and then check in 1 or more licenses, and then retry to checkout, it is always a failure :mad: .

Can anyone explain this behavior or cause?
Note: This behaviour will appear only if your feature is allowed checkouts > 2
Working with lt_checkout() and lt_checkin() functions in C# code.

12-08-2006, 07:58 PM
Have you made sure that the license was returned?

You may need to do a lmstat -a -c <license_filename> to see how many license was consumed. If it's 5 then you need to check where did you lc_checkin().

Hope this helps.