VLS_RELEASE \ LSRelease

Requests that the License Manager release licenses associated with a handle.

Syntax

LS_STATUS_CODE VLS_RELEASE (LS_HANDLE	 lshandle);

 

Argument Description

lshandle

The handle previously returned by the corresponding request call.

Description

Releases the license(s) associated with lshandle, allowing them to be immediately used by other requesting applications. For a shared license, all client applications must release their licenses before the License Manager marks the license as available.

About LSRelease

A variant of the VLS_RELEASE function is also available which allows passing additional parameters for specific purposes. Refer to the syntax and parameters below for more details.

The function calls, return codes, and data types that begin with the LS prefix are part of the LSAPI standard, which was followed up till few years ago and has now been dropped. The API that begin with the VLS prefix are the extensions that make licensing easier to implement.

LS_STATUS_CODE LSRelease (
LS_HANDLE	lshandle,
unsigned long	units_consumed, 	
unsigned char	*log_comment );
Argument Description

lshandle

Same as VLS_RELEASE's lshandle parameter described above.

units_consumed

>The number of units required to be released.

>From RMS v9.5 onwards, this attribute supports up to 4,294,967,294 units. This is applicable for license version 20 and above.

log_comment

>If vendor usage data attribute consists of multiple words, each will be anonymized individually, only if they are separated using a space. In general, avoid specifying the same entry (or word) twice in the vendor usage data attribute as the "uniquely" anonymized data will be repeated.

>The spaces in the vendor usage data attribute are replaced with underscores (_). Also, the keyword <an> itself is not anonymized and is replaced by an underscore (_) in the resulting usage log line record.

>To complete the vendor usage data attribute anonymization process, the system administrator must have also allowed anonymity of user information (either by setting the LS_LOG_ANONYMITY environment variable or using the -log-anonymity License Manager start-up option).

Returns

The status code LS_SUCCESS is returned if successful. Otherwise, it will return the following error codes:

Error Code Description

VLS_CALLING_ERROR

>lshandle is an ambiguous handle; it is not exclusively active or exclusively queued.

>The log comment value has exceeded the maximum allowed buffer size. Up to 100 characters are allowed (excluding the null character). If you plan to have only a part of data as anonymized, then use the following formula to calculate the maximum allowed data: 100 bytes = 17x + y, where "x" is the number of words to be anonymized and "y" is the length of the unanonymized data. If you plan to have only anonymized characters in the usage log file, then after the anonymization tag <an>, up to 6 words separated by a space can be included.

>The log comment probably consists of the hash (#) sign in the beginning or end of the string. Also, it should not contain consecutive hash signs.

VLS_RETURN_FAILED

Generic error indicating that the license could not be returned.

VLS_ALL_UNITS_ RELEASED

The function released all the issued units when the client requested to release only few.

VLS_NO_SERVER_ RUNNING

License Manager on specified host is not available for processing the license operation requests.

VLS_NO_SERVER_ RESPONSE

Communication with License Manager has timed out.

VLS_HOST_ UNKNOWN

Invalid hostName was specified.

VLS_BAD_SERVER_ MESSAGE

Message from License Manager could not be understood.

LS_NO_NETWORK

Generic error indicating that the network is unavailable for servicing the license operation.

LS_NORESOURCES

An error occurred in attempting to allocate memory needed by function.

VLS_RESOURCE_LOCK_FAILURE Failed to fetch the API resource lock. On receiving this error, retry calling this API.

For a complete list of the error codes, see Licensing Library Error and Result Codes.