VLSsetConsumeLimit

Syntax

LS_STATUS_CODE 	 	VMSWINAPI VLSsetConsumeLimit (
LS_HANDLE	 	lshandle,
CONSUME_LIMIT_TYPE	consume_type,
CONSUME_OPERATION_TYPE	consume_op_type,
long LSFAR        	*consume_value,
LS_CHALLENGE LSFAR      *challenge );

Parameter

Direction

Data Type

Description

lshandle

IN

LS_HANDLE

The license handle. A valid license handle is returned by the RMS License Manager when the license request is successful.

consume_type

IN

CONSUME_LIMIT_TYPE

Specifies the type of the limit whose current value is to be obtained. It can be either of the following:

>VLS_LIMIT_TYPE_VOLUME - Sets the number of transaction-based limit.

>VLS_LIMIT_TYPE_DURATION - Sets the duration-based limit.

consume_op_type

IN

CONSUME_OPERATION_TYPE

Specifies the type of the operation to be performed. It can be either of the following:

>VLS_SET - Increments or decrements the current limit by the value specified in the consume_value. To decrement, specify a negetive value.

>VLS_RESET - Overwrites the current limit value with the value specified in consume_value.

consume_value

IN/OUT

long

A pointer to a user allocated memory filled by the value (limit) to set or reset.

challenge

UNUSED

LS_CHALLENGE

Currently unused. Use NULL.

Description

Increases, decreases, or resets the limit in the volume transaction licensing database for a particular license.

Returns

The API returns LS_SUCCESS when the API is successful otherwise it returns the following error codes:

Status

Description

VLS_CALLING_ERROR

>When the consume_value is NULL

>When the consume_type is not VLS_LIMIT_TYPE_VOLUME or VLS_LIMIT_TYPE_DURATION

>When the consume_op_type is not VLS_SET or VLS_RESET

LS_BADHANDLE

An invalid handle.

VLS_NOT_SUPPORTED

If the API is called with a handle corresponding to a queued client or a capacity token.

VLS_NEW_RECORD_FOUND

If the limit value has been updated by any other process after the current process has retrieved the limit value. The API function would also return the current limit value in the consume_value parameter.

VLS_OPERATION_NOT_SUCCESSFUL

The requested operation failed for any other reason.