This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, February 28, 2008 12:26:56 PM(UTC)
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?
#2
Posted
:
Thursday, March 6, 2008 7:52:55 AM(UTC)
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)
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
#4
Posted
:
Thursday, March 20, 2008 2:50:07 AM(UTC)
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
#5
Posted
:
Thursday, March 20, 2008 7:24:30 AM(UTC)
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.