VLSgenerateUpgradeLockCode

Syntax

int VLSgenerateUpgradeLockCode ( unsigned char *lic_string, unsigned char *upgrade_lock_code, 
                                                                      unsigned long *buffer_size );

 

Argument Description

lic_string

Base license string.

upgrade_lock_code

Buffer containing the generated upgrade locking code. The caller should allocate the memory space.

buffer_size

Size of the allocated buffer.

If NULL is passed instead of the buffer, then this will return the buffer size required for the generated upgrade locking code.

Description

VLSgenerateUpgradeLockCode allows the user to generate a unique upgrade code for the base license. The upgrade code must be an encrypted string.

NOTE   This API is a part of lsutil32.lib.

Returns

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

Error Code Description

LS_NORESOURCES

Unable to allocate memory required to decode the passed license string and to generate upgrade code.

VLS_CALLING_ERROR

If called with invalid arguments.

LS_NO_SUCCESS

If unable to generate upgrade code.

VLS_VENDORIDMISMATCH

This error can occur under the following scenarios:

>The vendor of the requesting application does not match with the license vendor.

>The license addition failed due to mismatch among the vendor of the license and vendor of the isolated License Manager.

VLS_UPGRADE_NOT_ALLOWED

It shall not generate the upgrade code if the base license is found to be a multi-feature short numeric, or trial or commuter or redundant license.

LS_BUFFER_TOO_SMALL

buffer parameter is NULL.

Size of the upgrade locking code exceeds the buffer_size parameter.

For the complete list of the error codes, refer to Upgrade License Error Codes.