...
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
"printf("Here you can run your features\n");
LMX_Checkin(LmxHandle, "feature", LMX_ALL_LICENSES);
LMX_Free(LmxHandle);
return 0;
} |
...