Solved

Scanning images - TWAIN in c#

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Office.Interop.Word Document - Detect Macros not working 16 37
VB.Net How to Exit Sub - Exit Form??? 5 51
Export import database 4 43
Wav problem 4 13
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

910 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now