PDA

View Full Version : Why this settings at Flexlm SDK for VENDOR_STRING doesn't work?


bridgeic
February 10th, 2015, 22:56
Self-defined VENDOR_STRING, how to merge into Flexlm SDK to get lmcrypt.exe? Is there related interface?

Reference http://www.woodmann.com/IDArchive/ID-RIP/database/essays/amante/flexlm2.htm

Fox example, I want create lmcrypt.exe to generate license with VENDOR_STRING="Platform:NT". I do settings below in lmcrypt.c and lmkeyfil.c and link them with lmcrypt.exe in the makefile.

lmcrypt.c
extern char *my_filter( CONFIG *);
......
lc_set_attr(lm_job, LM_A_CHECKOUTFILTER,(LM_A_VAL_TYPE)my_filter);

lmkeyfil.c

int my_filter( CONFIG *input)
{
char *vendor_string;
input->lc_vendor_def = "Platform:NT";
// fprintf("abc=s%", vendor_string);
return (0); // success because the vendor string is OK
}

Compile succeed, but can't get VENDOR_STRING="Platform:NT" with lmcrypt.exe, why? Anything wrong with my settings? Is there related interface in Flexlm SDK?

free_sim
February 22nd, 2015, 01:35
Hi Bridgeic,

together with your questions, I had some relevant issues with compiling lmcrypt.c in which I need to set LM_A_LICENSE_CASE_SENSITIVE with 1 ( true). but not success. do you have any experience here to defeine
lc_set_attr(lm_job, LM_A_LICENSE_FILE,...) in lmcryt.c which can enable it have the case sensitive function with encrypt the license?

My question is : where should I put this attr setting in lmcrypt.c? I once read API flexlm 11.9.1 and they say "

This is accomplished as follows:
• In the FlexEnabled application, before the call to lc_checkout, set the LM_A_LICENSE_CASE_SENSITIVE
attribute as follows:
lc_set_attr(lc_job, LM_A_LICENSE_CASE_SENSITIVE, (LM_A_VAL_TYPE) 1);
• In lsvendor.c, set the ls_a_license_case_sensitive attribute as follows:
int ls_a_license_case_sensitive = 1;
• In the license generator, before the call to lc_cryptstr, set the LM_A_LICENSE_CASE_SENSITIVE attribute as
follows:
lc_set_attr(lc_job, LM_A_LICENSE_CASE_SENSITIVE, (LM_A_VAL_TYPE) 1);
• For publisher-defined hostids, set the case_sensitive field of the LM_VENDOR_HOSTID structure to 1.

you can also send thru your messge to me : tecmia@126.com. Or post here . thanks!

bridgeic
February 27th, 2015, 21:31
Hello free_sim,

You can try settings below. Line "iofiles and for" can help locate where to put the setting in lmcrypt.c .

lc_set_attr(lc_job, LM_A_LICENSE_CASE_SENSITIVE, (LM_A_VAL_TYPE) 1);

iofiles = (char **)safe_malloc(argc*sizeof(char *));
for (i=1; i<argc; i++)
{
......
}

bridgeic
February 28th, 2015, 02:09
input->lc_vendor_def = "Platform:NT";

should be changed to

strcpy(input->lc_vendor_def, "Platform:NT";

but still can't get license with right VENDOR_STRING, it will be very appreciated if any friend can give help.