cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
ccox_3482
Flexera beginner

Any know how to use LM_A_PORT_HOST_PLUS

I am trying to get a list of features the user has rights to so I can show them in our own applications UI.  I found LM_A_PORT_HOST_PLUS in the fnp_FuncRef-c.pdf help document but I have no clue how to use it or how it actually works.  I am currently using lc_feat_list() and lc_checkout() with LM_CO_LOCALTEST but I think LM_A_PORT_HOST_PLUS might be a better option?

0 Kudos
1 Reply
Flexera aparashar1
Flexera

Re: Any know how to use LM_A_PORT_HOST_PLUS

Hi There,

You can set this attribute in client application code (for example lmflex.c), as:

(void)lc_set_attr(lm_job, LM_A_PORT_HOST_PLUS, (LM_A_VAL_TYPE)1);

Post which you can make other API queries like "lc_feat_list" OR "lc_next_conf" - to get the authenticated info from license server.

Kindly be advised that if using this attribute in client application, the license file must have the USE_SERVER keyword.

 

Client code example:

================

lc_set_attr(lm_job, LM_A_PORT_HOST_PLUS, (LM_A_VAL_TYPE)1);
(void) lc_set_attr(lm_job, LM_A_LICENSE_DEFAULT, (LM_A_VAL_TYPE)"@localhost");


for (feats = lc_feat_list(lm_job, LM_FLIST_ALL_FILES, NULL); feats && *feats; feats++)
{
ret = lc_checkout(lm_job, *feats, "1.0", 1, LM_CO_NOWAIT, &code, LM_DUP_NONE);
if (ret == 0)
{
pos = 0;
conf = 0;
while (conf = lc_next_conf(lm_job, *feats, &pos))
{
printf("Feature: %s\n", conf->feature);
printf(" Package Mask: %#x\n", conf->package_mask);
}
lc_checkin(lm_job, *feats, 1);
}
//else
{
printf("Feature: %s (CHECKOUT FAILED: %d)\n", *feats, ret);
}
}

======================================

Hope it helps.

0 Kudos