You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

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 eOption information for the specific option, listed below.

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).

LMX_SetOption functions

The functions for LMX_SetOption are listed below. Unless otherwise specified, the LMX_SetOption options affect checkout requests.

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

 

eOption

LMX_OPT_HOSTID_CACHE_CLEANUP_INTERVAL
This flag lets you change the HostID cache interval (in seconds).
By default, HostIDs are cached the first time during checkout requests.
By setting this flag, you can avoid devices being used as HostIDs because they were cached. For example, a user could make a checkout using a dongle, then move the dongle to another computer and use it again while the dongle HostID is cached.
Use caution if changing this setting. An interval that is too low can decrease performance by creating too many checks. Conversely, an interval that is too high (or disabled) can compromise security. When this flag is disabled, no cache cleanup occurs.

pSetting

Possible values:
An integer, as follows:
0 (disabled) >0 (seconds)
Default value:
120 (seconds)

 

eOption

LMX_OPT_RESERVATION_TOKEN
This flag sets a reservation token that can be used together with LMX_Checkout to consume a reservation that was made for a particular feature and token.

pSetting

NULL-terminated string.
Default value:
NULL (disabled)

 

eOption

LMX_OPT_BIND_ADDRESS
This flag lets you limit which networks the client can connect to. When this flag is set, the client can use only the specified IP address to connect to a network.
You can set either an IPV4 address (for example, 192.168.0.2) or IPV6 address (for example, 1:2:3:4::1) that represents the local IP address you want to communicate through.
When this flag is not set, the client can connect to any available network.

pSetting

NULL-terminated string.
Default value:
NULL (disabled)

 

eOption

LMX_OPT_HOSTID_ENABLED
This flag specifies a particular HostID type to use during checkout.
When this flag is set, only the specified HostID will be used during checkout. You should ensure that the HostID specified is a HostID type that is used by the client.
By default all HostID types are enabled, so to use this setting, you must first set the option LMX_OPT_HOSTID_DISABLED using LMX_HOSTID_ALL HostID as the HostID type. This will disable all HostIDs so that only the HostID specified in LMX_OPT_HOSTID_ENABLED will be used.

pSetting

Enum value of type LMX_HOSTID_TYPE.
Default value:
LMX_HOSTID_ALL

 

eOption

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(...);
  • No labels