Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Scanning images - TWAIN in c#

Posted on 2006-06-28
3
Medium Priority
?
6,499 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

604 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