sntl_lg_generate_license() Function

Description

Generates the license.  

Usage Notes

The 'resultant_state' parameter points to the consolidated state. The consolidated state is the expected final state (in XML format) on the end user machine after successful application of license. This state is the result of the current state passed at the time of sntl_lg_start() together with the license definition that was applied up to this point using sntl_lg_start() and sntl_lg_apply_template(). If the consolidated state is saved to a file, the file can used as the C2V file for a future update to the protection key on the end user machine.

This function allocates memory for the information it retrieves. To release allocated memory resources, use the sntl_lg_free_memory() function.

To reuse the handle again for license definition validation or license generation, call the sntl_lg_start() function with the same handle. The sntl_lg_start() function frees all the resources acquired for the handle and allows license generation on the same handle without calling sntl_lg_initialize().

Syntax

sntl_lg_status_t SNTL_LG_CALLCONV sntl_lg_generate_license (
          sntl_lg_handle_t  handle,  
          const char *     generation_param,           char **         license,           char **         resultant_state   
)

Parameters

handle

[IN] License generation handle.

generation_param

[IN] Reserved for future use. Set this parameter to NULL.

license

[OUT] Pointer to the license that is retrieved.

resultant_state

[OUT] Pointer to the resultant state.

If a current state was not provided in sntl_lg_start(), the resultant state here returns NULL. For example, for license types SNTL_LG_LICENSE_TYPE_PROVISIONAL and SNTL_LG_LICENSE_TYPE_GENERIC_UPDATE, sntl_lg_start() does not accept a current_state.

Return Values

SNTL_LG_STATUS_OK

SNTL_LG_LIB_INITIALIZATION_FAILED

SNTL_LG_RESOURCE_LOCK_FAILURE

SNTL_LG_OUT_OF_MEMORY

SNTL_LG_INVALID_HANDLE

SNTL_LG_INVALID_PARAMETER

SNTL_LG_INVALID_API_CALL_SEQUENCE

SNTL_LG_INVALID_LICENSE_DEFINITION

SNTL_LG_KEY_FULL

SNTL_LG_INTERNAL_ERROR

SNTL_LG_KEY_CURRENT_STATE_MISSING

SNTL_LG_INSUFFICIENT_SEAT_POOL

SNTL_LG_MASTER_FEATURE_NOT_FOUND

SNTL_LG_MASTER_FEATURE_EXPIRED

SNTL_LG_MASTER_NO_BATTERY_POWER

SNTL_LG_NOTHING_TO_GENERATE

SNTL_LG_DYNAMIC_RESOURCE_NOT_SUPPORTED

SNTL_LG_LICENSE_DENIED_ON_VM

SNTL_LG_VENDOR_OLD_LM

SNTL_LG_EXCEEDING_MAX_PRODUCT_COUNT_LIMIT

SNTL_LG_EXCEEDING_MAX_FEATURE_COUNT_LIMIT

SNTL_LG_EXCEEDING_MAX_FILE_COUNT_LIMIT

SNTL_LG_UNLIMITED_CONCURRENCY_AND_CLOUD_NOT_ALLOWED

Related Topics

sntl_lg_initialize()

sntl_lg_start()

sntl_lg_apply_template()