?
Solved

Scanning images - TWAIN in c#

Posted on 2006-06-28
3
Medium Priority
?
6,493 Views
Last Modified: 2010-07-27
Hi,

Anyone know of a third party component to read images from a scanner using C# - framework 2?

Thanks.
0
Comment
Question by:jasoncpp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
dkloeck earned 2000 total points
ID: 17000262
Here is a nice project that scans:
http://www.codeproject.com/dotnet/twaindotnet.asp

it explains everything you need
0
 

Expert Comment

by:goopyJava
ID: 24019029
Preface Note
I am a bit new to Experts Exchange so I am not quite sure what it means for a solution to be closed. Keeping that in mind, I shall continue this discussion since my comments seem to pertain closely to the discussion...

Background
I attempted to use the project referred to in the answer with an Epson V100 scanner and found that the though I could get to the initial "preview" scan screen, I couldn't scan any images. Running in debug mode, the reason was obvious looking at the following code segment:

           Marshal.StructureToPtr(winmsg, evtmsg.EventPtr, false);
            evtmsg.Message = 0;
            TwRC rc = DSevent(appid, srcds, TwDG.Control, TwDAT.Event, TwMSG.ProcessEvent, ref evtmsg);
            if (rc == TwRC.NotDSEvent)
            {
                return TwainCommand.Not;
            }

            if (evtmsg.Message == (short)TwMSG.XFerReady)
Basically, the library wants the "transfer ready" message and the "Message" property on the event message structure always comes back 0 ("Null") - meaning the program never initializes the transfer and the scan never happens.

The Question
My question then is, cost aside, where could I find a third party library that allows me to scan multiple images during a single session from TWAIN into a .NET application and if this isn't easy to find, then what might I do to fix the application that answered the original question?
0
 

Expert Comment

by:goopyJava
ID: 24032073
Since I believe this discussion is probably stale I will add just one more comment in reply to my previous comment. After looking around at many different commercial TWAIN interfaces I found here (http://www.devdirect.com/all/IMAGEDIGITAL_PCAT_1927.aspx) I determined that this interface (http://www.vintasoft.com/vstwain-dotnet-index.html) works quite well in .NET. I hope this helps anyone else who has the same issues I had.
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question