Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, August 10, 2006 11:24:27 AM(UTC)
jljamison

Groups: Registered
Posts: 19



platform:  Raster Imaging library (MFC/MS C++/MSVS2000) on Microsoft Windows 2000 SP4

I have an installer that installs an end-user application plus the required LEAD libraries into a folder on a target machine. This machine does not have the LEADTools developer kit installed.

The call to LoadLibraries(...) is returning 0, yet the libraries in question are right there in the directory with the executable application.  Downstream I get an error -1046 "WRPERR_LTTWN_NOT_LOADED"

(1) where can I get additional diagnostic error information to uncover the underlying problem?

(2) why would LoadLibraries return 0?

(3) are there any other steps needed to deploy an application that uses Raster Imaging functionality:

-> TWAIN
-> Image/bitmap display in TIF/JPG
-> ImageList control
-> Image rotation

I include the following libraries (DLLs) with my application:

LTKRN14N
LTDIS14N
LTTWN14N
LTFIL14N
LTLST14N
LTWVC14N

The call to LoadLibraries looks like:

const L_UINT32 cLeadLibraries = LT_KRN | LT_TWN | LT_DIS | LT_FIL | LT_LST;
...
L_UINT32 result = LBase::LoadLibraries(cLeadLibraries);
[--> returns 0]
...
WRPUNLOCKSUPPORT();

Thanks

John Jamison

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Sunday, August 13, 2006 2:11:51 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

Hello,

To check the exact DLL that causes the problem, please try to debug the problem as follows:
------------------------------------
L_UINT32 nRet;
...
nRet = LBase::LoadLibraries(LT_KRN);
nRet = LBase::LoadLibraries(LT_DIS);
nRet = LBase::LoadLibraries(LT_FIL);
nRet = LBase::LoadLibraries(LT_TWN);
nRet = LBase::LoadLibraries(LT_LST);
...
------------------------------------
Checked the nRet value after each call of LoadLibraries and let me know how it goes.
Also, do you face the same problem on the development machine? And what is the build number of LEADTOOLS DLLs on your machine?

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Sunday, August 13, 2006 6:38:39 PM(UTC)
jljamison

Groups: Registered
Posts: 19


Will gather that data tomorrow.

Development machine works perfectly fine.

I have 14.5 with the service pack/patch applied. (14.5.0.10). 

-John Jamison
 
#4 Posted : Monday, August 14, 2006 7:51:42 AM(UTC)
jljamison

Groups: Registered
Posts: 19


All calls to LoadLibraries return 0

 
#5 Posted : Monday, August 14, 2006 11:27:15 PM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

Hello,

To narrow down the problem possibilities please make sure that the DLLs are in the PATH or in the same folder with the Exe and retry the same issue.

Please let me know how it goes.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#6 Posted : Tuesday, August 15, 2006 5:36:02 AM(UTC)
jljamison

Groups: Registered
Posts: 19


I already tried that.  Still returns 0.  I also tried putting the dlls in the windows system32 folder, which was also in the PATH.

 
#7 Posted : Tuesday, August 15, 2006 8:42:35 AM(UTC)
jljamison

Groups: Registered
Posts: 19



Also, before you ask, I created an installer project for the LEAD tools Twain demo sample.  I modified the project to work with visual studio 2003 and made the following changes:

1) added the lead tools LIB directory as an "Additional Library Directory"  (Project Properties->Linker->General pane)
2) added ltwvc_n.lib as an additional dependency (Project Properties->Linker->Input pane
3) I removed the automatically added "Detected dependency" of ltwvc14n.dll (from %SystemRoot%\system32) and added files %LeadRoot%\redist\ltwvc14n.dll and \redist\lttwn14n.dll to the installer
4) build the installer, copied the folder to my target windows 2000 computer (lead tools development sdk not installed)
5) installed the application.  In the application folder are the following:

CLTWNDemo32.exe
lttwn14n.dll
ltwvc14n.dll
mfc71d.dll
msvcr71d.dll

When I run cltwndemo32.exe, LoadLibraries is called with LT_ALL_LEADLIB and returns 0.  Even if other lead tools libraries are required, the call to loadlibraries is supposed to return an indicator of which libraries were loaded successfully. Since it returns zero, it isn't loading any libraries.  Same as my end user application which attempts to load 5 lead tools libraries.

The PATH variable includes a folder that contains the lttwn14n and ltwvc14n dlls (and others).

Anyone else successful deploying an end-user application for Windows 2000 SP4?  This is quite mystefying

 
#8 Posted : Thursday, August 17, 2006 12:36:45 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

Hello,

On a Windows 2000 SP4 machine, I loaded the demo EXE shipped with LEADTOOLS, which is CLTWNDemo32.exe, and executed it inside the Visual C++ 6 debugger. The following list of DLLs were loaded in the debugger. Some of them are Windows or Microsoft files, while others are LEADTOOLS files. Please check that all of them exist on your machine:
===========================
ADVAPI32.DLL
avifil32.dll
comctl32.dll
COMDLG32.DLL
CRYPT32.DLL
GDI32.DLL
imm32.dll
indicdll.dll
KERNEL32.DLL
lpk.dll
ltann14n.dll
ltaut14n.dll
ltbar14n.dll
LTCLR14n.dll
ltcon14n.dll
LTDIS14n.dll
LTDlgClr14n.dll
LTDlgCom14n.dll
LTDlgCtrl14n.dll
LTDlgEfx14n.dll
LTDlgFILE14n.dll
LTDlgImg14n.dll
LTDlgImgDoc14n.dll
LTDlgImgEFX14n.dll
ltdlgkrn14n.dll
LtDlgRes14n.dll
ltdlgutl14n.dll
LTDlgWeb14n.dll
ltefx14N.dll
ltFIL14n.dll
ltimg14n.dll
ltisi14n.dll
ltkrn14n.dll
ltlst14n.dll
ltnet14n.dll
ltpdg14n.dll
LTSCR14n.dll
LTSGM14n.dll
lttlb14n.dll
lttmb14n.dll
lttwn14n.dll
LTWEB14N.dll
LTWVC14n.dll
Lvdlg14n.dll
Lvkrn14n.dll
lz32.dll
mfc42.dll
mmdrv.dll
mpr.dll
msacm32.dll
msasn1.dll
msimg32.dll
msvcp60.dll
msvcrt.dll
msvfw32.dll
ntdll.dll
OLE32.DLL
OLEAUT32.DLL
oledlg.dll
OLEPRO32.DLL
PIXDFLTN.DLL
PIXLOCN.DLL
PIXPERMN.DLL
rpcrt4.dll
serwvdrv.dll
SHELL32.DLL
shlwapi.dll
USER32.DLL
usp10.dll
version.dll
wininet.dll
winmm.dll
WINSPOOL.DRV
ws2_32.dll
ws2help.dll
===========================

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#9 Posted : Thursday, August 17, 2006 10:23:49 AM(UTC)
jljamison

Groups: Registered
Posts: 19


Most of the libraries you list, with the exception of the lt*.dll (lead tools) libraries are in %SystemRoot%\system32

The only exceptions are:
pixdfltn.dll
pixlocn.dll
pixpermn.dll

I only deployed the leadtools libraries pertinent to my application. In any case, even if I were missing one leadtools library, I would expect the others to load successfully.  Unless you can confirm with the developer(s) that any one particular leadtools library missing from an application folder or PATH folder would cause LoadLibraries to return 0 for any LeadTools library.

Surely other people have deployed end user applications (Raster Imaging library), built with C++.  Is there a problem with compatibility with Visual Studio .Net 2003?  I sure hope not...

John Jamison
 
#10 Posted : Thursday, August 24, 2006 4:23:19 AM(UTC)

Travis  
Travis

Groups: Registered, Tech Support
Posts: 207

Was thanked: 3 time(s) in 3 post(s)

This seems to be a flaw in previous builds of our library. 
Through emails at support@leadtools.com we resolved this issue by using build 14.5.0.18.


If you are experiencing this same issue make sure your DLLs are at
least build 14.5.0.18.  If so and the issue persist email support@leadtools.com with your issue.
Travis Montgomery
Senior Sales Engineer
LEAD Logo
 
#11 Posted : Saturday, August 26, 2006 8:10:08 AM(UTC)
markKirchdoerfer

Groups: Registered
Posts: 4


Heya, I looked at the patches and the highest version there is 4.5.0.16.  I am alos having issues registering these DLL's.  How do I get the latest version of the Dll's and how robust are they?
 
#12 Posted : Wednesday, September 13, 2006 1:04:31 PM(UTC)
jljamison

Groups: Registered
Posts: 19



Unfortunately it appears to not have solved the problem.  I wrote a simple Test MFC app. All it does is call LoadLibraries on Kernel and Twain

The installation folder has
LeadTest.exe
ltwvc14n.dll  (14.5.0.18)
ltkrn14n.dll   (14.5.0.18)
lttwn14n.dll   (14.5.0.18)
MFC and VS CRT libraries

The target system is a Windows 2000 server having never had Lead tools SDK or demo installed.  I have another Win2000 system that does not have the SDK installed but for which the problem went away using the 0.18 libraries. I can't explain it...

LoadLibraries returns 0 for each call (LT_KRN and LT_TWN)
------------------------------------
   L_UINT32 nRet = LBase::LoadLibraries(LT_KRN);
   if (nRet==0)
       ::MessageBox(NULL,_T("LoadLibraries(LT_KRN) failed."),"Error",MB_ICONERROR | MB_OK);

   nRet = LBase::LoadLibraries(LT_TWN);
   if (nRet==0)
       ::MessageBox(NULL,_T("LoadLibraries(LT_TWN) failed."), NULL, MB_ICONERROR | MB_OK);
--------------------------------------

-John Jamison

 
#13 Posted : Monday, September 18, 2006 5:37:25 AM(UTC)

Travis  
Travis

Groups: Registered, Tech Support
Posts: 207

Was thanked: 3 time(s) in 3 post(s)

I receive the same error if I do not have LTKRN14n.dll deployed.  If I have LTKRN14n.dll deployed the error goes away.  Please make sure you have LTKRN14n.dll copied onto the deployed machine.
Travis Montgomery
Senior Sales Engineer
LEAD Logo
 
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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.345 seconds.