#1
Posted
:
Sunday, October 8, 2017 7:48:07 AM(UTC)
Groups: Registered
Posts: 11
Thanks: 1 times
Hi,
I am trying getrow() example code(under examples\cdll folder) to perform some operations on my image for OCR. I finally got it to compile but it seems to give me license error every time I run. I do have eval license and I am unable to find the place in code to replace the license key to check out the functionality I want to check. Can someone point me so that i can run this sample code?
thanks,.
#2
Posted
:
Monday, October 9, 2017 11:57:40 AM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 63
Thanks: 2 times
Was thanked: 4 time(s) in 4 post(s)
TBone,
You can set your license within the "Ltunlock.h" file found under the "External Dependencies" folder.
What is the error you are receiving when running these demos? Additionally which specific demo are you attempting to run?
Joe Zhan
Developer Support Engineer
LEAD Technologies, Inc.
#3
Posted
:
Tuesday, October 10, 2017 12:12:04 AM(UTC)
Groups: Registered
Posts: 11
Thanks: 1 times
Joe,
I am getting "Your license file is missing, invalid or expired. LEADTOOLS will not function. Please contact LEAD sales...." error. I have eval license and I was able to run my other piece of code.
Thanks for the Ltunlock.h, but I changed both SetDefaultLIC (enterd LIC file path and actual key (not the path) for key) and SetCommonLic (entered lic path and I guess file names take it from there). Unfortunately I still get the same error message.
#4
Posted
:
Tuesday, October 10, 2017 12:19:00 AM(UTC)
Groups: Registered
Posts: 11
Thanks: 1 times
joe, After sending previous reply, I was messing with the code by changing the error message itself to see which check causes the error to appear but it seems the error message given by the EXE doesnt change irrespective of my code change in Ltunlock.h. I am curious whether that is the right place to add my license information.
PS: Yes, I saved the .h file edits before compiling :)
Please let me know so that I can use my eval period effectively to make sure I can do what I want to do.
Thanks and I appreciate your help.
#5
Posted
:
Friday, October 13, 2017 7:48:49 AM(UTC)
Groups: Manager, Tech Support, Administrators
Posts: 218
Was thanked: 12 time(s) in 12 post(s)
If you look in the Getrow.cpp, on line 59, the UNLOCKSUPPORT() call is what you need to edit. As Joe said, this method is defined in the Ltunlock.h file located in 'C:\LEADTOOLS 19\Include'
This is what it looks like by default:
Code:#define UNLOCKSUPPORT() \
L_BOOL licenseSet = L_FALSE; \
{ \
SETDEFAULTLIC(); \
licenseSet = !L_KernelHasExpired(); \
if(!licenseSet) \
{ \
SETCOMMONLIC(); \
} \
licenseSet = !L_KernelHasExpired(); \
if(!licenseSet) \
{ \
L_TCHAR licmsg[1024] = L_TEXT("Your license file is missing, invalid or expired. LEADTOOLS will not function. Please contact LEAD Sales for information on obtaining a valid license."); \
L_TCHAR logmsg[1024]; \
wsprintf(logmsg, L_TEXT("*** NOTE: %s ***\n"), licmsg); \
OutputDebugString(L_TEXT("*******************************************************************************\n")); \
OutputDebugString(licmsg); \
OutputDebugString(L_TEXT("\n*******************************************************************************\n")); \
::MessageBox(NULL, licmsg, L_TEXT("No LEADTOOLS License"), MB_OK | MB_ICONERROR); \
ShellExecute(NULL, L_TEXT("open"), L_TEXT("https://www.leadtools.com/downloads/evaluation-form.asp?evallicenseonly=true"), NULL, NULL, 1); \
} \
}
So the SETDEFAULTLIC() function is the one you need to edit to look for your license file:
Code:#define SETDEFAULTLIC() \
{ \
/* TODO: Change this to use your license file and developer key */ \
L_TCHAR * pszLicenseFile = L_TEXT("Replace this with the path to the LEADTOOLS license file"); \
L_TCHAR * pszDeveloperKey = L_TEXT("Replace this with your developer key"); \
L_SetLicenseFile(pszLicenseFile, pszDeveloperKey); \
};
the pszLicenseFile is the path to the license file, while the pszDeveloperKey is the actual contents of the lic.key file so it should look like this afterwards:
Code:#define SETDEFAULTLIC() \
{ \
/* TODO: Change this to use your license file and developer key */ \
L_TCHAR * pszLicenseFile = L_TEXT("C:\\LEADTOOLS 19\\Common\\License\\LEADTOOLS.LIC"); \
L_TCHAR * pszDeveloperKey = L_TEXT("###########################################"); \
L_SetLicenseFile(pszLicenseFile, pszDeveloperKey); \
};
Please let me know if you continue to have issues with this. Please remember to not share your license or developer key on the forums as they are public. If you continue to have issues, we can work on this through email so that you can send me your
code/license and I can check it out here.
Have a nice day!
Thank you!
Hadi Chami
Developer Support Manager
LEAD Technologies, Inc.
#6
Posted
:
Sunday, October 15, 2017 10:32:48 AM(UTC)
Groups: Registered
Posts: 11
Thanks: 1 times
Hi Hadi,
Yes, I am still having issues. Can we have a session or something to check it out? Please email me to follow up on this.
I received the extended eval licence but unable to use it for the first half so far. I would really like to check this and get it done.
Thanks and appreciate your help.
#7
Posted
:
Monday, October 16, 2017 3:37:59 PM(UTC)
Groups: Manager, Tech Support, Administrators
Posts: 218
Was thanked: 12 time(s) in 12 post(s)
I have sent you an email to the email that you have registered on the forums. If you have not received this email or if your email is wrong, please send an email to
support@leadtools.com so that we can get this resolved.
Thank you!
Hadi Chami
Developer Support Manager
LEAD Technologies, Inc.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.