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, February 28, 2008 12:26:56 PM(UTC)

SergiiM  
SergiiM

Groups: Registered
Posts: 6


Hello!

I'm using Leadtools 15, coding C# .NET 2.0.

During exploring TwainSession class I can not find clear explanation of using "thread" flags.
       1.TwainSrartupFlags.InitializeMultithreaded (
Initialize the Twain session without multi threaded option)
       2.TwainFastUserInterfaceFlags.UseThread (Enable using thread mode)

Does anybody can explain "how" and "when" to use this flags and for what kind of scenarios  is  better  to use those flags instead of others?


 

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, March 6, 2008 7:52:55 AM(UTC)

SergiiM  
SergiiM

Groups: Registered
Posts: 6


So I guess nobody knows about this flags at all, and flags are present just with no purpose.....
 
#3 Posted : Friday, March 7, 2008 11:24:59 AM(UTC)

Travis  
Travis

Groups: Registered, Tech Support
Posts: 207

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

At present the documentation does not clearly state what these are used for, nor when they should be used.  As soon as I hear back from our developers regarding these flags, I will post back what they are used for and when they should be used.
Travis Montgomery
Senior Sales Engineer
LEAD Logo
 
#4 Posted : Thursday, March 20, 2008 2:50:07 AM(UTC)

Travis  
Travis

Groups: Registered, Tech Support
Posts: 207

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

In our API, the L_TwainInitSession2 function takes a LTWAIN_INIT_MULTI_THREADED flag.  In our .NET classes, the TwainSession::StartUp function takes a InitializeMultithreaded flag.  For both cases, this allows the a call to L_TwainAcquire/TwainSession::Acquire to occur in a separate thread.  We create the child thread internally and handle all threading activity.  The benefit of scanning in this fashion is to allow your application the ability to scan and during the scan your application's UI to be responsive.  Most scanners have a Modal dialog pop up.  This allows the dialog to be Modeless.

In our API, the L_TwainAcquireMulti function takes a LTWAIN_USE_THREAD_MODE flag.  In our .NET classes, the TwainSession::AcquireFast function takes a UseThread flag.  For both cases, this flag is used only with these functions and allows the scanning process to occur faster.  It was designed to work when scanning in Memory mode and should increase the speed of the acquisition.  If you are scanning in Native or File mode, this flag may speed up these modes as well, depending on the capabilities supported by the scanner.
Travis Montgomery
Senior Sales Engineer
LEAD Logo
 
#5 Posted : Thursday, March 20, 2008 7:24:30 AM(UTC)

SergiiM  
SergiiM

Groups: Registered
Posts: 6


I was thinking something like this but now it is clear (this flags usage is independent).

Thank you, Travis.





 
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-2020, Yet Another Forum.NET
This page was generated in 0.096 seconds.