VLSaddFeatureToFile

Syntax

int VLSaddFeatureToFile (	 	 
unsigned char	 	*licenseString,
unsigned char	 	*unused1,
unsigned char	 	*unused2,
unsigned char	 	*unused3 );
Argument Description
licenseString

The license_string character.

unused1

Should be NULL.

unused2

Should be NULL.

unused3

Should be NULL.

Description

Writes a license dynamically to either the redundant license file or normal license file. The feature is permanently added to the License Manager when the License Manager is shutdown and restarted.

Returns

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

Error Code Description

VLS_CALLING_ERROR

Attempted to use standalone mode with network only library, or network mode with standalone library.

LS_NO_SUCCESS

licenseString is NULL

VLS_ADD_LIC_FAILED

Generic error indicating the feature has not been added.

VLS_CLK_TAMP_FOUND

License Manager has determined that the client’s system clock has been modified. The license for this feature has time-tampering protection enabled, so the license operation is denied.

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 is specified.

VLS_NO_SERVER_FILE

License Manager has not been set and is unable to determine which License Manager to use.

VLS_BAD_SERVER_ MESSAGE

Message returned by the License Manager could not be understood.

LS_NO_NETWORK

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

LS_NORESOURCES

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

VLS_ADD_LIC_FAILED Error 19 is received when 2000 features are already loaded on the License Manager and the user tries to add more feature(s).

NOTE   When there are 256 licenses under a feature and you try to add another license, the API is successful and no error is returned. However, it is recommended that maximum 256 licenses should be added under a single feature.

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