Page tree
Skip to end of metadata
Go to start of metadata
The information on this page refers to LM-X v4.9 and newer, which added HostIDs for Google Compute Engine and Azure. If you are using an older version of LM-X, refer to documentation for earlier versions. 

For maximum flexibility in your licensing options, you can define the HostID values for your protected application within the license rather than inside the protected application. This enables you to license your application differently for different users, without requiring your application to be recompiled.

Note: The maximum length of a HostID value is 256 bytes.

You can use the lmxendutil utility or the LM-X End-user Configuration Tool to print out the valid HostIDs for a particular machine.  

The following HostIDs are supported in the license:

HostID Type


Platform Availability


Network card HostID



Username HostID



Hostname HostID



IP address HostID



Custom HostID



HaspHL Dongle HostID

Windows (x86 and x64)

Linux (x86 and x64)

Mac OS


HostID of physical harddisk

Windows (x86 and x64; not available for use with MinGW compiler)


System-specific HostID

Mac OS


Bios HostID

Windows (x86 and x64; not available for use with MinGW compiler)


Windows Product ID

Windows (x86 and x64)


Amazon EC2 Instance ID

Windows (x86 and x64) within Amazon EC2 environment

Linux (x86 and x64) within Amazon EC2 environment


Google Compute Engine ID

Windows (x86 and x64) within GCE environment

Linux (x86 and x64) within GCE environment


Azure ID

Windows (x86 and x64) within Azure environment

Linux (x86 and x64) within Azure environment

For help on deciding which HostID or combination of HostIDs fits your needs, see Determining which HostID to use. For complete information about the operating system versions that are supported by LM-X, see Supported platforms.   


For license generation, LM-X can handle different Ethernet HostID formats in the license template based on the operating system representation of the address when using ipconfig (Windows) or ifconfig (Unix); for example, AABBCCDDEEFF, AA:BB:CC:DD:EE:FF or AA-BB-CC-DD-EE-FF.


LMX_HOSTID_DONGLE_HASPHL is a HostID representing physical dongles. You may use 3rd-party dongles, which require some custom programming, or purchase dongles from X-Formation (provided by Aladdin) that work out of the box, without need for further customization. While dongles provide the best possible security of the aforementioned HostIDs, they come with additional distribution overhead.

To use dongles on Windows, you should instruct your end users to plug in the dongle and let Windows find the device driver automatically using Windows Update. For other platforms, you can download the appropriate device driver from our website.

When LMX_HOSTID_DONGLE_HASPHL is used with a license server, background checking is done to ensure that users don't remove the dongle from the server machine when serving licenses. Doing so will cause the license server to stop functioning after a short time.

When using LMX_HOSTID_DONGLE_HASPHL with local standalone licenses, the client application should ensure that the dongle is not removed during client runtime.

You can check the dongle by calling LMX_Heartbeat on a separate thread continuously, or by ensuring that LMX_HOSTID_DONGLE_HASPHL HostID is in use and comparing the HostID value against the last known good value, as demonstrated in the following example. 

int i;
int nHostids;
LMX_GetFeatureInfo(LmxHandle, "my_app", &FI);
/* Go through each hostid used for this particular feature */
for (i = 0; i < FI.nClientLicenseHostids; i++)
  /* See if the hostid is a dongle hostid */
  if (FI.ClientLicenseHostid[i].nHostidType == LMX_HOSTID_DONGLE_HASPHL)
    /* See if hostid function reports the same value as we used when checking out the license */
    if (LMX_Hostid(LmxHandle, LMX_HOSTID_DONGLE_HASPHL, LmxHostid, &nHostids)!= LMX_SUCCESS) 
      return BAD_DONGLE;
    if (nHostids != 1)
      return BAD_DONGLE;
    /* Compare if the hostid at checkout time matches the hostid at present time */
    if (strcmp(FI.ClientLicenseHostid[0].szValue, LmxHostID[0].szValue) != 0) 
      return BAD_DONGLE;

This check should preferably be done every few minutes to ensure that users do not move the dongle to other workstations and overuse standalone licenses.

See LMX_Hostid for further information on LMX_Hostid.