Home › Forums › TWAIN Classic › TwainCSScan sample code.
- This topic has 1 reply, 2 voices, and was last updated 8 years, 1 month ago by MarkM.
- AuthorPosts
I have built the TWAIN for C-Sharp sample code and found when I run it it works fine until you Close and open the same scanner or another one.
There is memory corruption when you Open a scanner after closing it or another one.
Scan a few times seems to work but there is memory corruption and I am not sure where it is.
I am using the fujitsu fi-7160.
To reproduce to problem:
Run TWAIN for C-Sharp preferably from within devstudio 2010-15
Open the fi-7160
Scan a few times
Close the fi-7160
Open the fi-7160
Scan a few time
The following will expose the memory corruption.
Run the snipping tool that comes with windows 7.
Select an area of the screen to snip, it does not matter what.
If you are in the debugger of VS you will get an Access violation exception in the Main program.cs.You can also run this in WinDbg and see it happen.
This does not happen with all scanners.
It seems as though the this is not really being closed or cleaned up correctly for all scanners.
This is also true for the Xerox Documate 3220 as well.I also have a fujitsu fi-6230 and it works fine.
Anybody have an idea why this is happening?
Is there something missing in the TWAIN for C-Sharp implementation that would take care of this issue?Thanks
neticous
A number of fixes were made and checked on multiple scanner models. It’s very likely this problem has been addressed…
- AuthorPosts