Date: Fri, 29 Mar 2024 11:15:04 +0100 (CET) Message-ID: <21625718.5394.1711707304098@confluence-server> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_5393_726179086.1711707304098" ------=_Part_5393_726179086.1711707304098 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
The LMX_Checkout function = will checkout one or more licenses for a specific feature.
LMX_STAT= US LMX_Checkout ( LMX_HANDLE LmxHandle, const char *szFeatureName, int nVerMajor, int nVerMinor, int nCount );
LmxHandle<= br>[in/out] LM-X handle.
szFeatureName
[in] Feature name.
nVerMajor<= br>[in] Major version number, in the = range 0-9999.
nVerMinor<= br>[in] Minor version number, in the = range 0-9999.
nCount
=
[in] Number of licenses to checkout.<=
/span>
This value can be one of the follo= wing:
An inte= ger in the range 1-2147483647 |
Lets yo= u set the count to the specified number. |
LMX_LOG= ICAL_CPU_COUNT |
Lets yo= u implement processor-based licensing by setting the count to the number of= logical CPUs. |
LMX_PHY= SICAL_CPU_COUNT |
Lets yo= u implement processor-based licensing by setting the count to the number of= physical CPUs. |
On success, this function returns = the status code LMX_SUCCESS.
If softlimit licensing is enabl= ed and the license count has exceeded the specified softlimit licenses, thi= s function can return the status code LMX_SOFTLIMIT, which also indicates s= uccess.
On failure, this function returns = an error code in the format described in Return codes. Note that the = error code returned reflects only the last license file tested or license s= erver contacted. (See the execution order in Remarks, below.)
To get a complete error descriptio= n, use the API function LMX_GetErrorMessage().
Se= e Sea= rch paths in the <= em>LM-X End Users Guide&nbs= p;for more information about h= ow the LMX_Checkout method finds the license.
For local license files, the count= value is ignored and checking will depend only on HostID, version, etc.
By default, the version number req= uested in the function call can be lower than the one available in the lice= nse file.
This function will attempt to retr= ieve the feature from either a license server or a local license file. If t= he feature is available on a license server, all other feature requests wil= l go to the same license server. LM-X will establish the license server con= nection transparently to the client application. The execution order is as = follows:
It is recommended that all license= s come from the same source (that is, the same local license file or the sa= me license server) or as few sources as possible for simplicity and to make= licensing most straightforward for users. However, it is technically possi= ble to take licenses from multiple license files and multiple license serve= rs at the same time. See License server for more information.
It is also recommended that you do= as few checkouts as possible = to fulfill requests. Preferably, checkouts should map directly to the numbe= r of licenses you sell to your customer. This helps ensure that customers u= nderstand the products they have bought and the licenses associated with th= em.
When License queuing<= /a> is enabled, LMX_QUEUE will be ret= urned (see Return codes) if a license checkout is not successful, aft= er which you should call LMX_Checkout again to see if a license is availabl= e. The queue request is made simultaneously to all the license servers to w= hich the client connects. When one of the servers satisfies the client requ= est, the queue request is removed from all of the servers.
For information on how to increase= license checkout performance, see Optimizing license check= out speed.
Example
The following example illustrates = the process of checking out a license for feature "f2", version 1.0.=
#include= <lmx.h> #include <stdio.h> LMX_HANDLE h; int main()=20 { exit_on_error(LMX_Init(&h)); exit_on_error(LMX_Checkout(h, "f2", 1, 0, 1)); return 0; }