Versions Compared

Key

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

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

...

Prototype

LMX_STATUS LMX_SetOption
(
LMX_HANDLE LmxHandle,
LMX_SETTINGS eOption,
const void *pSetting
);

...

Parameters

LmxHandle
[in/out] LM-X handle.

eOption
See the table of LMX_SetOption Options and Settings eOption information for the specific option, listed below.

pSetting
See the table of LMX_SetOption Options and Settings 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).

LMX_SetOption functions

The following table describes the eOption and pSetting parameter values functions for LMX_SetOption , including:are listed below. Unless otherwise specified, the LMX_SetOption options affect checkout requests.

  • See "LMX_OPT_HEARTBEAT_CHECKOUT_SUCCESS_FUNCTION" on page
  • See "LMX_OPT_HEARTBEAT_CHECKOUT_FAILURE_FUNCTION" on page
  • See "LMX_OPT_HEARTBEAT_RETRY_FEATURE_FUNCTION" on page
  • See "LMX_OPT_HEARTBEAT_CONNECTION_LOST_FUNCTION" on page
  • See "LMX_OPT_HEARTBEAT_EXIT_FUNCTION" on page
  • See "LMX_OPT_HEARTBEAT_CALLBACK_VENDORDATA" on page
  • See "LMX_OPT_CUSTOM_HOSTID_FUNCTION" on page
  • See "LMX_OPT_HOSTID_COMPARE_FUNCTION" on page
  • See "LMX_OPT_LICENSE_PATH" on page
  • See "LMX_OPT_LICENSE_STRING" on page
  • See "LMX_OPT_EXACT_VERSION" on page
  • See "LMX_OPT_ALLOW_BORROW" on page
  • See "LMX_OPT_ALLOW_GRACE" on page
  • See "LMX_OPT_TRIAL_DAYS" on page
  • See "LMX_OPT_TRIAL_USES" on page
  • See "LMX_OPT_TRIAL_VIRTUAL_MACHINE" on page
  • See "LMX_OPT_TRIAL_TERMINAL_SERVER" on page
  • See "LMX_OPT_AUTOMATIC_HEARTBEAT_ATTEMPTS" on page
  • See "LMX_OPT_AUTOMATIC_HEARTBEAT_INTERVAL" on page
  • See "LMX_OPT_CUSTOM_SHARE_STRING" on page
  • See "LMX_OPT_SERVERSIDE_REQUEST_STRING" on page
  • See "LMX_OPT_LICENSE_IDLE" on page
  • See "LMX_OPT_CUSTOM_USERNAME" on page
  • See "LMX_OPT_CUSTOM_HOSTNAME" on page
  • See "LMX_OPT_BLACKLIST" on page
  • See "LMX_OPT_ALLOW_MULTIPLE_SERVERS" on page
  • See "LMX_OPT_HOSTID_CACHE_CLEANUP_INTERVAL" on page
  • See "LMX_OPT_RESERVATION_TOKEN" on page
  • See "LMX_OPT_BIND_ADDRESS" on page
  • See "LMX_OPT_HOSTID_ENABLED" on page
  • See "LMX_OPT_HOSTID_DISABLED" on page_DISABLED

 Unless otherwise specified, the options in the following table affect the checkout requests.

LMX_SetOption Function eOption and pSetting Parameter Values

 

eOption

Anchor
-1814820658
-1814820658
LMX_OPT_HEARTBEAT_CHECKOUT_SUCCESS_FUNCTION
This flag causes a callback function to be called when the heartbeat (per feature) has the status LMX_SUCCESS; that is, a heartbeat succeeds in reclaiming a license after a license server disconnection.

pSetting

Function pointer value.Default value:NULL (disabled)Prototype:void (LMX_CALLBACK *HeartbeatCheckoutSuccess_pfn)(
void pVendorData, / Vendor-specified data /const char *szFeatureName, / Name of feature successfully reclaimed */int nUsedLicCount */ Number of licenses reclaimed, which is equal to the number originally checked out */);

...

eOption

Anchor
-2117169936
-2117169936
LMX_OPT_HOSTID_DISABLED
This flag specifies a particular HostID type to remove during checkout.
When this flag is set, the specified HostID type is not used during checkout, which can improve performance.
Setting this flag to LMX_HOSTID_ALL will disable all HostID types, so that you can set a specific HostID type using LMX_OPT_HOSTID_ENABLED.

pSetting

Enum value of type LMX_HOSTID_TYPE.
Default value:
None. By default, all HostID types are enabled.

 

...

...

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 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:

/* 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(...);