VLSdeleteLicenseFromFile

Syntax

LS_STATUS_CODE VLSdeleteLicenseFromFile (	 	 
unsigned char	*feature_name,
unsigned char	*version,
unsigned char	*license_hash,
int	 	license_hash_len,
unsigned char	*license_string,
int	 	*license_string_bufsize,
void	 	*unused1,
int	 	unused2 ); 	 	 
Argument Description

feature_name

The feature name identifier of the license code.

version

The version identifier of the license code.

license_hash

The license hash to identify a specific license code.

license_hash_len,

The allocated size for the license hash, passed as input.

license_string

An OUT parameter. The deleted license code returned by the License Manager.

license_string_bufsize

An IN/OUT parameter. Allocated size for the license code passed as input. Returns the actual size of the deleted license string.

This buffer size must be equal to macro VLS_MAX_LICENSE_SIZE.

unused1

An unused variable.

unused2

An unused variable.

Description

Deletes a non-capacity license from the License Manager's memory and file.

Deletes a non-capacity license code that is not in use, from the License Manager's memory and the license file. The license code to be deleted is identified by the feature-version-license hash combination.

This API returns the deleted license code back to the caller. The caller needs to allocate the buffer for the license_string argument. The size of this buffer is passed as the license_string_bufsize argument. The license code deletion process fails, if the license code to be deleted is in use.

If the license_string is passed as NULL. In this case, the API does not return the deleted license_string back to the caller.

The VLSgetLicenseInfo API can be used to obtain information about licenses installed. It returns a structure containing license hash value to identify a license code.  

Returns

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

Error Code

Description

VLS_CALLING_ERROR

Argument specified is not correct, that is, one of the following reasons exist:

> If license_hash_len < 1 or license_hash_len > VLS_MAX_LICENSE_HASH_LEN.

>If license_hash is passed as NULL.

> If license_string is not NULL and license_string_bufsize is NULL.

> If feature_name or version buffer size exceeds the maximum size limit Specified as VLS_MAXFEALEN and VLS_MAXVERLEN respectively.

>If the length of license_hash passed is more than VLS_MAX_LICENSE_HASH_LEN.

VLS_APP_UNNAMED

When any of the following parameters (feature_name, version, and license hash) is NULL. Or, they contain only the NUL character i.e '\0'.

VLS_NO_SUCH_FEATURE

License with passed feature-version combination not found.

VLS_NO_SUCH_LICENSE

License with passed feature-version-license hash combination not found.

LS_BUFFER_TOO_SMALL

This indicates an error that the allocated buffer is insufficient to store the deleted license string.

VLS_LICENSE_IN_USE

This indicates an error that the license to be deleted is currently in use. This means that the specified license has some active clients.

VLS_STORE_ACCESS_ERROR

Failure in accessing the license file or persistence store.

VLS_RESOURCE_LOCK_FAILURE

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

LS_NORESOURCES

Error occurred in allocating resources needed by this API.

VLS_DELETE_LIC_FAILED

This indicates a generic error that the license deletion process has failed.

VLS_MULTIPLE_VENDORID_FOUND

This occurs when more than one licenses for the specified Feature/Version is available on the License Manager, but the Vendor ID for all these licenses is different from the licensing library's Vendor ID.

VLS_SEVERE_INTERNAL_ERROR

This indicates failure that occurs in internal message construction and splitting while processing the API.

LS_NO_NETWORK

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

VLS_NO_SERVER_RUNNING

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

VLS_BAD_SERVER_MESSAGE

Message from License Manager could not be understood.

VLS_CAPACITY_MISMATCH

Error indicating that the license to be deleted is a capacity license.

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