Tattakashi123 / t

Automatically exported from code.google.com/p/twaindotnet
0 stars 0 forks source link

Twain not working in Console Application #15

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi Diego,

please find attached a simplified project. In the solution there are three
small projects:
1) TwainScanner: Which contains my wrapper class (SogeasScanner) for Twain
functionality (using your assemblies)
2) ScannerForm: A simple windows form application where i scan from the
press of a button..
3) ScannerConsole: A simple windows console application which should scan
just upon running it.

To run the ScannerForm, make it the startup project. To run the
ScannerConsole, make it the startup project.

In both the ScannerForm and the ScannerConsole, i call the same exact code
(from TwainScanner project) like this:

SogeasScanner scanner = new SogeasScanner();
scanner.ScanImage("c:/sogeas/test.bmp");

My problem is: The code above works from the Windows Form (ScannerForm)
application, but not from the Console application (ScannerConsole). The
console does not break anywhere.. it just doesnt call the scanner to
actually do the scan. You can look inside the SogeasScanner and see what im
doing. I even enabled the ShowTwainUI property. The console opens it, but
even if i click scan from there, nothing happens. The console application
just closes and never enters the ScanningComplete event handler which im
listening for. 

Sorry for annoying you today, but i really need to have this code working
for a big project im working on...

I'd greatly appreciate your help,

Thanks,

ZiggY.

Original issue reported on code.google.com by ziggy9...@gmail.com on 4 May 2010 at 1:58

Attachments: