...
- Start a new project in your IDE. Base your code on the example in LM-X_installation_directory\examples\network\network.c.
- Include the LM-X library into your application (see Integrate LM-X with your application using the LM-X API for more information).
Generate a floating license file using xmllicgen, located in LM-X_installation_directory\platform-specific_directory; for example, C:\LM-X\Win32_x86.
An example XML template for a floating license looks like the following:Code Block language html/xml <?xml version="1.0" encoding="utf-8"?> <LICENSEFILE> <SETTING END="2015-01-01" /> <FEATURE NAME="F1" /> <SETTING MAJOR_VERSION="1" /> <SETTING MINOR_VERSION="0" /> <SETTING COUNT="5" /> <SERVER_HOSTID> <SETTING ETHERNET="C8A516AD01AFC9FA" /> </SERVER_HOSTID?> </FEATURE> </LICENSEFILE>
To take the number of cores into account in your code (based on the local.c example), change the checkout parameter using LMX_Checkout:
LMX_Checkout(LmxHandle, "F1", 1, 0, 1)
For processor-based licensing that sets the count to the number of logical CPUs, change the checkout parameter to:LMX_Checkout(LmxHandle, "F1", 1, 0, LMX_LOGICAL_CPU_COUNT)
For processor-based licensing that sets the count to the number of physical CPUs, change the checkout parameter to:LMX_Checkout(LmxHandle, "F1", 1, 0, LMX_PHYSICAL_CPU_COUNT)
- Compile your application and start the license server to test that your application works as expected.
...