VLSucgGenerateLicense
Syntax
int VLSucgGenerateLicense ( VLSucg_HANDLE iHandle, ucodeT *ucodeP, char *upgrade_code,
char **result);
Argument | Description |
iHandle |
Instance handle for this library. |
ucodeP |
The pointer to ucodeT struct. |
upgrade_code |
Upgrade code of the base license. |
result |
Address of pointer pointing to generated license. |
Description
Generates the upgrade license for the given ucodeT struct.
VLSucgGenerateLicense should be called after all the VLSucgSet functions are called. Memory allocation and release for ucodeT are the responsibilities of the caller of the API. Memory allocation for the license string shall be taken care by the API.
VLSucgGenerateLicense decodes the upgrade_code and extracts the information of the base license. It performs the following validation before generating an upgrade license:
>Feature Name, version and vendor code of base license is matched with the base feature name, base version and vendor code of ucodeT.
>The capacity upgrade is allowed only if the base license is a non-pooled capacity license.
Returns
The status code VLScg_SUCCESS is returned if successful. Otherwise, it will return the following error codes:
Error Code | Description |
VLSucg_INVALID_INPUT |
If ucodeP is passed as NULL. |
VLSucg_INVALID_VENDOR_CODE |
If vendor identification is invalid. |
VLSucg_VENDOR_ ENCRYPTION_FAIL |
If vendor-customized encryption fails. |
VLSucg_MALLOC_FAILURE |
If an error occurred while allocating internal memory for ucodeT struct. |
VLSucg_LICMETER_ EXCEPTION |
If an error occurred while accessing the dongle. |
VLSucg_LICMETER_ COUNTER_TOOLOW |
If license meter count is less than the expected decrement count. |
VLSucg_NO_CAPACITY_ AUTHORIZATION |
If not allowed to generate capacity licenses. |
VLSucg_NO_UPGRADE_ AUTHORIZATION |
If not allowed to generate upgrade licenses. |
VLSucg_INTERNAL_ERROR |
If any internal error occurred while generating the license string. |
VLSucg_INVALID_BASE_LIC_INFO |
The information-feature name, version vendor code provided for the base license is incorrect. |
VLSucg_CAPACITY_UPD_ NOT_ALLOWED |
Capacity upgrade is not allowed, as the base license is a non-capacity license. |
VLSucg_INVALID_UPGRADE_CODE |
The specified upgrade code is invalid. |
VLSucg_LICMETER_NOT_ SUPPORTED |
Your Sentinel RMS License Meter is not supported. |
For the complete list of the error codes, refer to Upgrade License Error Codes.