Skip to main content

llkConsumeBatchOfExecutions

Description

Decreases the value of the executing balance counter.
This topic is only relevant when the license type for a Feature is LLK_EXECUTIONS.

One of the License types that can be defined for a Feature is Execution Count. This type contains a pool of executions from which the Feature consumes one or more executions as the protected application runs.

A typical use for this type of license is to assign a different "cost" in executions for the different functions that an application can perform. All the executions are consumed from a single pool of executions in the license. For example, the customer could be charged one execution for a save operation and three execution for a print operation. This provides an alternative to the method of assigning a different Feature ID and providing a separate executions pool for each action. With different Feature IDs, the customer might deplete all the executions for one Feature while unused executions remain for other Features

Syntax

llkConsumeBatchOfExecutions
LLKStatus LLK_API llkConsumeBatchOfExecutions(uint32_t featureId, const uint64_t executionsCount);

Parameters

ParamDescription
featureIdFeature number
executionsCountQuantity to be reduced

Return Values

Status CodeNo.Description
LLK_OK0Request was successfully completed. The operation status is successful
LLK_FEATURE_NOT_FOUND2Requested Feature not found
LLK_FEATURE_UNSUPPORTED_OPERATION5Feature type does not support the requested operation (relevant when the license type for a Feature is LLK_EXECUTIONS type)
LLK_FEATURE_INSUFFICIENT_EXECUTIONS_COUNT6Requested quantity is greater than current balance. The license for the Feature does not contain enough remaining executions
LLK_LICENSE_NOT_ACTIVATED_YET12The entitlement has not been activated yet. For activation/initialization, use llkActivateLicense

Examples

C++ example
  const LLKStatus status = llkConsumeBatchOfExecutions(featureId, 1);
std::cout << llkStatusDescription(status) << std::endl;

Example of a successful operation

The operation status is successful.
Note

In order to successfully use all other API functions, the entitlement must be activated or initialized. For activation/initialization, use llkActivateLicense


Version history

  • Added in version 1.0.0