The LMX_Admin_Reserve function will use a token to reserve one or more licenses for a specified time.

Prototype

LMX_STATUS LMX_Admin_Reserve
(
   LMX_HANDLE LmxHandle,
   const char *szFeatureName,
   int nVerMajor,
   int nVerMinor,
   int nCount,
   int nReservationTime,
   const char *szReservationToken
);

Parameters

LmxHandle
[in/out] LM-X handle.

szFeatureName
[in] Feature name.

nVerMajor
[in] Major version number, in the range 0-9999.

nVerMinor
[in] Minor version number, in the range 0-9999.

nCount
[in] Number of licenses to reserve for future checkouts.

This value can be one of the following:

An integer in the range 1-2147483647

Lets you set the count to the specified number.

LMX_LOGICAL_CPU_COUNT

Lets you implement processor-based licensing by setting the count to the number of logical CPUs.

LMX_PHYSICAL_CPU_COUNT

Lets you implement processor-based licensing by setting the count to the number of physical CPUs.

nReservationTime
[in] Length of time (in seconds) to reserve the license(s). After this time expires, the reserved license(s) will be returned to the pool.

szReservationToken
[in] Reservation token (a unique string that you specify) used to acquire and consume reservations.

Return values

On success, this function returns the status code LMX_SUCCESS.

On failure, this function returns an error code in the format described in SOAP API return codes. Note that the error code returned reflects only the last license file tested or license server contacted.

To get a complete error description, use the API function  LMX_GetErrorMessage().

See LMX_Checkout for additional information about return values, which also apply to this function.

Remarks

The reservation token is a unique string you specify, and can have a length up to LMX_MAX_SHORT_STRING_LENGTH. The token is used to acquire the reservation, which later can be consumed (checked out) using the same token.

See LMX_Checkout for additional remarks, which also apply to this function.