Solved

Scanning images - TWAIN in c#

Posted on 2006-06-28
3
6,483 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 500 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

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…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

697 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