Author Topic: Multi-threaded scanning issues  (Read 36 times)

Offline ricardobrooks

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
Multi-threaded scanning issues
« on: August 08, 2018, 11:46:57 PM »

I pretty much have GdPicture built into my entire application now except for one hickup, multi-threaded scanning. I have been working on it for a couple of days now but I just can't seem to get it to work. I have two scanners that I am working with. One is the Epson GT-S80 and the other is the Xerox Documate 510. Each scanner is working differently so I will try to explain. Hopefully there is an easy solution. By the way, I am using a Windows 7 64-bit computer and Visual Basic 2008 targeting the .NET 3.5 Framework and the X86 Platform.
Epson GT-S80 Twain driver - I have finally been able to get it to work on a separate thread. The problem is if I refer to the TWAIN source from anywhere in the original thread (such as by calling TwainSelectSource), the source manager gets opened and so for some reason the scanner will not function in the second thread. I was able to get it to work by calling the "TwainCloseSourceManager" method from the original thread before moving into the second thread.

Any help will be apprecited.

I didn't find the right solution from the Internet.

Decentralized Blockchain Marketing

Thank you.