VLSaddFeature
Syntax
int VLSaddFeature (
unsigned char *licenseStr,
unsigned char *unused1,
LS_CHALLENGE *unused2 );
Argument | Description |
licenseStr |
The license string that will be added. |
unused1 |
Should be NULL. |
unused2 |
Should be NULL. |
Description
Dynamically adds licensing information about a feature into the License Manager and adds the license code to the License Manager’s internal tables. If licensing information for this feature and version already exists in the License Manager’s tables, it may be overwritten with the new information contained in licenseStr.
NOTE A feature is not permanently added to the License Manager, but is cleared when the License Manager is shut down 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 was 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.