Versions Compared

Key

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

...

Panel

#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?

...