...
Code Block |
---|
|
/* First checkout request requires an exact version match to pass */
LMX_SetOption(..., LMX_OPT_EXACT_VERSION, (LMX_OPTION) 1);
LMX_Checkout(...);
/* Second checkout request does not require an exact version match to pass
but can have a higher version in license file than function request */
LMX_SetOption(..., LMX_OPT_EXACT_VERSION, (LMX_OPTION) 0);
LMX_Checkout(...); |
Example
The following example shows the use of LMX_SetOption by activating and deactivating LMX_OPT_EXACT_VERSION.
Code Block |
---|
|
#include <lmx.h>
#include <stdio.h>
LMX_HANDLE h;
int main() {
exit_on_error(LMX_Init(&h));
/* First checkout request requires an exact version match to pass */
exit_on_error(LMX_SetOption(h, LMX_OPT_EXACT_VERSION, (LMX_OPTION) 1));
exit_on_error(LMX_Checkout(h, "f2", 1, 0, 1));
/* Second checkout request does not require an exact version match to pass
and can request a version up to the one specified in the .lic file */
exit_on_error(LMX_SetOption(h, LMX_OPT_EXACT_VERSION, (LMX_OPTION) 0));
exit_on_error(LMX_Checkout(h, "f2", 0, 5, 1));
return 0;
}
|