LM_LOGOUT

Log out a previously logged in license

WSupported on Windows
USupported on Unix

 

NSupported in Synergy .NET
xcall lm_logout(lo_stat, producer, app_code, token[, seat])

lo_stat

Returned with the log-out status. The most common values are listed below; see Licensing Toolkit error messages for additional values that can be returned. (n)

0 = Success

3 = Invalid token

producer

The producer code for your company. (This code was assigned to your company by Synergex when you requested the License Key Generator.) (a)

app_code

The code that you created to refer to the application or application component. (a)

token

The token obtained from LM_LOGIN and used here to log out. (i4)

seat

(optional) A 32-bit integer set to the value that was passed in the seat argument to LM_LOGIN. (i)

LM_LOGOUT is used only when you have called LM_LOGIN with check set to 0 or 3 (or not passed) and the returned token was non-zero.

LM_LOGOUT doesn’t log out a process in the usual sense (that is, it does not prevent the application from continuing); rather, it requests that License Manager release the “slot” for the specified license so that another user can log in and use the available slot.

If the token returned by LM_LOGIN is non-zero, it should be saved by your application and passed to LM_LOGOUT. The token ensures that the process that is logging out is authorized to do so.

If you passed a non-zero value for seat to LM_LOGIN, pass the same value for seat to LM_LOGOUT. The seat, in combination with the token, ensures that the correct license is logged out in a server environment. If you pass seat to LM_LOGIN and fail to pass the same seat value to LM_LOGOUT, the results could be unpredictable.

On Windows, you must call LM_LOGOUT as part of your exit procedure, or the license will stay in use until License Manager logs it out; this could take as long as 20 minutes. You should also call LM_LOGOUT in case of an application error.

On Unix, although LM_LOGOUT is not required (normally licenses are logged out automatically when the runtime process has terminated), we recommend that you call LM_LOGOUT as part of your normal exit procedure, especially if your application STOP chains to another program. You should also call LM_LOGOUT in case of an application error.

The status values returned by LM_LOGOUT are for your information only; they have no effect on your application. You should write code to handle the returned status. You can access system error codes with %SYSERR, which may assist in troubleshooting.