VLSqueuedRequest
int VLSqueuedRequest(
unsigned char *license_system,
unsigned char *publisher_name,
unsigned char *product_name,
unsigned char) *version,
unsigned long *units_reqd,
unsigned char *log_comment,
LS_CHALLENGE *challenge,
LS_HANDLE *lshandle,
VLSqueuePreference *qPreference,
int *requestFlag);
Description
The call provides a mechanism to the calling application to ask the License Manager to grant a license if available. If no license is available, the client will be queued. The client can call VLSupdateQueuedClient to inquire if a license is available. Once a license is available, the client can call VLSgetQueuedLicense to obtain the license.
In response, the License Manager will either issue the license token when (and if) the license is available, put the client in the queue when the license is not available, or issue an appropriate error message, which describes the cause for not being able to service the request.
The client will pass the following information to the License Manager:
>Time in seconds for the client to wait in the queue for the license.
>Time in seconds for the License Manager to hold the license once it becomes available.
>Priority relative to other clients.
>The maximum position within the queue before which the client can be queued.
>The maximum position within the group queue, before which the client can be queued.
Notice that the LS_MAX_QLEN environment variable can override the qPreference structure. The end-user can put a limit on the maximum size of the queue by defining the LS_MAX_QLEN environment variable. This variable depends upon the availability of memory resources. The different values of LS_MAX_QLEN are:
>LS_MAX_QLEN not set. Client preference is applied.
>LS_MAX_QLEN = -1. Client preference is ignored and the client is always queued.
>LS_MAX_QLEN = 0. Queue is disabled and no clients will be put in the queue.
>LS_MAX_QLEN > 0. Overrides the client’s preference.
Similarly variable LS_MAX_GRP_QLEN will override the setting of the max group wait time in the qPreference structure.
Variables LS_MAX_WAIT_SEC and LS_MAX_HOLD_SEC override the max wait time and max hold time elements of the qPreference structure.
Returns
The status code LS_SUCCESS is returned if successful. Otherwise, it will return the following error codes:
Error Code |
Description |
VLS_CALLING_ERROR |
>request_flag specifies queuing but qPreference is NULL. >lshandle is NULL. >challenge argument is non-NULL, but cannot be understood. >publisherName is NULL >The log comment value has exceeded the maximum allowed buffer size. >The log comment value has exceeded the maximum allowed buffer size. Up to 100 characters are allowed (excluding the null character). If you plan to have only a part of data as anonymized, then use the following formula to calculate the maximum allowed data: 100 bytes = 17x + y, where "x" is the number of words to be anonymized and "y" is the length of the unanonymized data. If you plan to have only anonymized characters in the usage log file, then after the anonymization tag <an>, up to 6 words separated by a space can be included. >The log comment probably consists of the hash (#) sign in the beginning or end of the string. Also, it should not contain consecutive hash signs. >The log comment value has exceeded the maximum allowed buffer size. Up to 50 characters are allowed (excluding the null character). If you plan to have only anonymized characters in the usage log file, then after the anonymization tag <an>, up to 3 words separated by a space can be included. If you plan to have only a part of data as anonymized, then use the following formula to calculate the maximum allowed data: 50 bytes = 17x + y, where "x" is the number of words to be anonymized and "y" is the length of the unanonymized data. >The log comment probably consists of the hash (#) sign in the beginning or end of the string. Also, it should not contain consecutive hash signs. |
VLS_APP_UNNAMED |
>product_name is NULL >version is NULL |
VLS_NO_LICENSE_GIVEN |
>units_reqd is zero. >Invalid handle specified. >Generic error indicating that the license is not granted. |
LS_NOLICENSESAVAILABLE |
All licenses in use. |
LS_INSUFFICIENTUNITS |
License Manager does not currently have sufficient licensing units for the requested feature to grant a license. |
VLS_NO_SUCH_FEATURE |
License Manager does not have a license that matches requested feature, version and capacity. |
LS_LICENSE_EXPIRED |
License has expired. |
VLS_NOMORE_QUEUE_RESOURCES |
Queue is full. |
VLS_APP_NODE_LOCKED |
Requested feature is node locked, but request was issued from an unauthorized machine. |
VLS_USER_EXCLUDED |
User or machine excluded from accessing requested feature. |
VLS_CLK_TAMP_FOUND |
License Manager has determined that the client’s system clock has been modified. The license for this feature has time-tampering protection enabled, so the license operation is denied. |
VLS_VENDORIDMISMATCH |
The vendor identification of the requesting application does not match the vendor identification of the feature for which the License Manager has the license. This error occurs only when client is older than version 6.3 else the error returned is VLS_NO_SUCH_FEATURE. |
VLS_TRIAL_LIC_EXHAUSTED |
Trial license has expired. |
VLS_NO_SERVER_RUNNING |
License Manager on specified host is not available for processing license operation requests. |
VLS_NO_SERVER_RESPONSE |
Communication with License Manager has timed out. |
VLS_HOST_UNKNOWN |
Invalid hostName is specified. |
VLS_NO_SERVER_FILE |
The License Manager has not been set and is unable to determine which License Manager to use. |
VLS_BAD_SERVER_MESSAGE |
Message returned by the License Manager could not be understood. |
LS_NO_NETWORK |
Generic error indicating that the network is unavailable for servicing the license operation. |
VLS_NON_REDUNDANT_ SRVR |
License Manager is non-redundant and therefore cannot support this redundancy-related operation. |
VLS_SERVER_SYNC_IN_ PROGRESS |
License Manager synchronization in process. |
VLS_FEATURE_INACTIVE |
Feature is inactive on specified License Manager. |
VLS_MAJORITY_RULE_ FAILURE |
Majority rule failure prevents token from being issued. |
LS_NORESOURCES |
An error occurred in attempting to allocate memory needed by this function. |
For the complete list of the error codes, refer to Licensing Library Error and Result Codes.