Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


The information on this page refers to LM-X v5.4 or newer, which introduced LMX_OPT_TRIAL_CLOUD_HOST.

The LMX_SetOption function sets flags that change licensing behavior prior to license checkout.

Prototype

Code Block
languagecpp
LMX_STATUS LMX_SetOption

...


(
   LMX_HANDLE LmxHandle,

...


   LMX_SETTINGS eOption,

...


   const void *pSetting

...


);

Parameters

LmxHandle
[in/out] LM-X handle.

...

pSetting
See the Setting information for the specific option, listed below.

Note: To avoid warnings when using the pSetting parameter, you can typecast it to the type (LMX_OPTION).

...

The functions for LMX_SetOption are listed below.  

Note: Unless otherwise specified, the LMX_SetOption options affect checkout requests.

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 Return SOAP API return codes.

Remarks

Note that some of the flags are used in combination with checkout requests. This enables you to set flags for single checkout requests if needed. For example:

Example

The following example shows the use of LMX_SetOption by activating and deactivating LMX_OPT_EXACT_VERSION.

Code Block
languagecpp
#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 
   but and can haverequest a version higherup to versionthe inone licensespecified filein thanthe function.lic requestfile */
  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;
}