#include "lmclient.h"
#include "lm_attr.h"
/*...*/
VENDORCODE code;
LM_HANDLE *lm_job;
if (lc_new_job(0, lc_new_job_arg2, &code, &lm_job))
{
lc_perror(lm_job, "lc_new_job failed");
exit(lc_get_errno(lm_job));
}
/* You define loc for the following call to
lc_set_attr() with the expected location
of the application’s license file directory.
See Section 5.4, “Determining the License File Location,”
for more details on locating the license file.*/
lc_set_attr(lm_job, LM_A_LICENSE_DEFAULT,
(LM_A_VAL_TYPE)loc);
if (lc_checkout(lm_job, "myfeature", "1.0", 1,
LM_CO_NOWAIT, &code, LM_DUP_NONE))
{
lc_perror(lm_job, "checkout failed");
exit (lc_get_errno(lm_job));
}
/*
* Checkout succeeded. Actual application code here
*/
/*...*/
lc_checkin(lm_job, "myfeature", 0);
lc_free_job(lm_job);