I can not activate scanning process. I see my scanner model detected inside scanners list, I choose it and after pressing Scan button, Visual studio report The following exception.
¨
System.ArgumentException
HResult=0x80070057
Message=Values is out of expected range
Source=Interop.WIA
StackTrace:
in WIA.PropertyClass.set_Value(Object& pvResult)
in ScannerDemo.Scanner.SetWIAProperty(IProperties properties, Object propName, Object propValue) v souboru C:\ourcodeworld-csharp-scanner-wia-f072d40\ScannerDemo\Scanner.cs: řádek 228
in ScannerDemo.Scanner.AdjustScannerSettings(IItem scannnerItem, Int32 scanResolutionDPI, Int32 scanStartLeftPixel, Int32 scanStartTopPixel, Int32 scanWidthPixels, Int32 scanHeightPixels, Int32 brightnessPercents, Int32 contrastPercents, Int32 colorMode) v souboru C:\ourcodeworld-csharp-scanner-wia-f072d40\ScannerDemo\Scanner.cs: řádek 208
in ScannerDemo.Scanner.ScanTIFF() v souboru C:\ourcodeworld-csharp-scanner-wia-f072d40\ScannerDemo\Scanner.cs: řádek 148
in ScannerDemo.Form1.<>c__DisplayClass5_0.b__1() v souboru C:\ourcodeworld-csharp-scanner-wia-f072d40\ScannerDemo\Form1.cs: řádek 107
in System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
in System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
in System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
in System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
in System.Windows.Forms.Control.InvokeMarshaledCallbacks()
My scanner is correctly working with Microsoft Fax and scanner app and with other apps which are supporting WIA scanner interface. Is it possible to get supported values by A scanner so code would send usable value? I would like to scan A4 page, 300 DPi resolution and grayscale. I do not see at all and app which I loved so much, Microsoft document Scanning, which is The part of Microsoft Office 2003 Standard for students and Teachers do not work after I have applied all updates for Microsoft Office when running it on Windows 10. Very strange fact is, that Microsoft Document Scanning work perfectly, when I do not apply Microsoft Office 2003 updates. Some dlls problems, but as A visually impaired, I Am helpless to use Process Monitor from Sysinternals, because there are so many dynamically changed items, that screen reader totally froze so I can not track The cause. So I AM finding some free solution for scanning multiple pages. I had A dream to make simple Autohotkey script, which would be able to scan without display WIA scanner dialog to speed up scanning process, but It was not so easy as I could think. One VBA Macro could do that, but I had issues how to set other values than for photograph, which have been predefined by macro Thank you very much for yours help. I Am sending detailed scanner properties in The next comment.