...
Code Block |
---|
#include <stdio.h> #include "lmx.h" int main() { LMX_HANDLE LmxHandle; if (LMX_Init(&LmxHandle) != LMX_SUCCESS) { printf("Unable to initialize!\n"); return 1; } // Look for licenses in current directory. LMX_SetOption(LmxHandle, LMX_OPT_LICENSE_PATH, "."); if (LMX_Checkout(LmxHandle, "feature", 1, 0, 1) != LMX_SUCCESS) { printf("Unable to checkout!\n"); LMX_Free(LmxHandle); return 1; } // Here you are safe to run your licensed features run_my_features(); LMX_Checkin(LmxHandle, "feature", LMX_ALL_LICENSES); LMX_Free(LmxHandle); return 0; } |
"You should save this as an example.c." What do you mean by that?
...
Now you should have the following files in your current directory:
- license.xml: , i.e. your license template
- license.lic : reaady to use the license, generated with xmllicgen
- example c. : your first program source code
- example/example.exe: , i.e. your program executable
Now run your first LM-X licensed application.