Versions Compared

Key

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


The information on this page refers to LM-X v5.3.3 or newer, which introduced the LMX_GetHostType API function.


The LMX_GetHostType function lets you check the type of the host machine.

Prototype

Code Block
languagecpp
LMX_HOST_TYPE LMX_GetHostType(void);

Return values

This function returns one of the following types:

Code Block
languagecpp
LMX_UNKNOWN_TYPE
LMX_HOST_PHYSICAL
LMX_HOST_VIRTUAL


Remarks

Virtualization detection is officially supported for VMware, Microsoft Hyper-V, VirtualBox, KVM and QEMU. See Licensing for virtual machines and cloud computing for more information.


Example

Code Block
languagecpp
if (LMX_GetHostType() == LMX_HOST_VIRTUAL)
{
  printf("This software is not allowed to run in virtual environment!\n");
  exit(1);
}