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 : Wednesday, October 17, 2007 3:57:54 AM(UTC)

Ventar  
Ventar

Groups: Registered
Posts: 7


We've an application which was developed in MS Visual Studio 2003 and scans documents with LeadTools .Net 14.0.

Now this application has been ported to MS Visual Studio 2005 and .Net 2.0. So we use now LeadTools .Net 14.5.

After starting up the TwainSession object with StartUpFlags = TwainStartupFlags.None, we can select the TWAIN source after calling _objTwain.SelectSource().

But now, always we call _objTwain.Acquire(TwainUserInterfaceFlags.Show) the correctly displayed scannerinterface appears and we can do all settings. But a click on the "scan" button doesn't return to our application / TwainSession. The dialog rests displayed. The only way out is the windows task manager and kill the whole process.

Exactly the same happens if we try to create a scanning profile over the method _objTwain.ShowTemplateDlg(.FileName).

Our earlier application (.Net 1.1, LeadTools 14.0) works fine on same system with same scanner / TWAIN.

Thanks in advance for any tips about that problem
Daniel
 

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 : Thursday, October 18, 2007 4:39:43 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,022

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


Daniel,


What is the build number (version info) of your LEADTOOLS 14.5 DLL files?


Please send your serial number to support@leadtools.com and mention this post, so that I can send you updated DLLs if you don't have them.

 
#3 Posted : Tuesday, October 23, 2007 9:40:14 PM(UTC)

Ventar  
Ventar

Groups: Registered
Posts: 7


Hi

Thanks for your post. The files we've bound in has the version number 14.5.0.30 and are built 12/12/2006.

I'll send you the serial today.

Thanks again for your help
Daniel
 
#4 Posted : Wednesday, October 24, 2007 12:38:26 AM(UTC)

Ventar  
Ventar

Groups: Registered
Posts: 7


I received now the version 14.5.0.68 - thanks.

I could add the neccessary referencies and compile the project without problems. But at runtime, I get immediatly following exception:

The file or Assembly Leadtools.Kernel, Version=14.5.0.68, Culture=neutral, PublicKeyToken=9cf889f53ea9b907 or one of its dependencies was not found. (Exception of HRESULT: 0x800736B1)

Of course I copied all patched files into the application directory. I checked the dependencies with MS Dependeny Walker. Following files were missing:
- msvcr80.dll
- msvcp80.dll
- msvcm80.dll
- dwmapi.dll

The problem still exists when I manually copy the files above into the application directory.

Dependency Walker genereates the following log message:
Error: The Side-by-Side configuration information in "....\debug\LEADTOOLS.KERNEL.DLL" contains errors.

Any ideas, what's wrong? Thanks in advance
Daniel
 
#5 Posted : Wednesday, October 24, 2007 2:55:44 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,022

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


Daniel,


Please try to download and install the Microsoft Visual C++ 2005 SP1 Redistributable Package from this link:


http://www.microsoft.com/downloads/details.aspx?familyid=200B2FD9-AE1A-4A14-984D-389C36F85647&displaylang=en


Please tell me if that solves your problem.

 
#6 Posted : Wednesday, October 24, 2007 3:25:35 AM(UTC)

Ventar  
Ventar

Groups: Registered
Posts: 7


Thank you Adam

This really fixed the assembly loading problem. Unfortunately I've now the same problem again as with version 14.5.0.30 :(

After calling
_objTwain.Acquire(TwainUserInterfaceFlags.Show)
the TWAIN dialog appears correctly, but there's no reaction on 'Scan' button. Also closing the dialog isn't possible. Task manager is the only way out.

Hope you have any further idea, thanks in advance.
Daniel
 
#7 Posted : Thursday, October 25, 2007 3:58:48 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,022

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


Daniel,


If you use one of our demo projects to scan, does it work? If not, can you test using a different scanner?


Also, if you use the utility
from the TWAIN working group called Twacker, does it work with your scanner? Please
try it if you haven't done so already to make sure the problem is not in the driver. If you don't have it, you can get it from:


http://www.twain.org/devfiles/twack.zip


 
#8 Posted : Thursday, October 25, 2007 4:18:06 AM(UTC)

Ventar  
Ventar

Groups: Registered
Posts: 7


Thanks again for the tipps.

I just solved the problem. I don't really understand it but it works again. I try to describe it:

I've a form in a multi document main form which contains the scan logic.

The scan form logic has the local var
Private WithEvents _objTwain As TwainSession

While initializing the scan form (already loaded and visible), following code becomes executed:
'--- Ensure Twain is available
If Not TwainSession.IsAvailable(_objDialog.ParentForm) Then
Return False
End If
_objTwain = New TwainSession()
_objTwain.StartupFlags = TwainStartupFlags.None
_objTwain.Startup(_objDialog.ParentForm, "xx", "yy", "4.2", "ScanStation")

On a key press event, the scanning starts with this code:
_objTwain.Acquire(TwainUserInterfaceFlags.Show)

If I use at initializing my scan form (a child form in my multi document program) the error occurs and the twain session doesn't react after calling Acquire.

Now I just use the main form of the application ScanForm.ParentForm and the TwainSession object works correctly.

Thanks again for your support. I'm happy about it works now again with .Net 2.0!

Daniel
 
#9 Posted : Thursday, October 25, 2007 5:13:17 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,022

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


Daniel,


I'm not sure how exactly
your project did this, but in general, the window in which you initialize LEADTOOLS
Twain must be a valid window, and must not be destroyed or blocked for the
entire life time of the Twain object. The reason is that the Twain object needs the window handle and message loop to be valid when it's working.

 
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.110 seconds.