brandonbrown
USA
37 Posts |
Posted - Jan 19 2022 : 23:26:43
|
This seems like another weird problem. This little snippet, or really any that access the TwainParams Class from within IEMulti or IEViewer is throwing an exception, but only when compiling with x64. The same code, when selecting Any CPU, works fine, not Exception.
In general, the Acuire series works in x64, but nothing from TwainParams. I can select my scanner with:
IEmulti.Imagelist.SelectAcquireSource(); Scanner name is returned in strScanner=IEmulti.ImageList.AcuireParams.SelectedSource IEMulti.ImageList.AcquireFromTWain();
This however, does not work if called after you scan a page in x64, but does for Any CPU: IEMulti.ImageList.TWainParams.GetSystemDefaultSource();
Nothing from the TWainParams class works in x64 from either the IEmulti or IEViewer.
The exception is:
Exception thrown: 'System.AccessViolationException' in sfScanPro.exe An unhandled exception of type 'System.AccessViolationException' occurred in sfScanPro.exe Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
I also tried it in a console app, same problem, code below:
multiScan.ImageList.SelectTWainSource(); multiScan.ImageList.TWainParams.ShowSettingsOnly = true; multiScan.ImageList.AcquireFromTWain();
Excpetion occurs on the TWainParams line.
I uninstalled, deleted iecore.dll from all locations found in the c:\windows directory and reinstalled, same issue. Works on everything when using Any CPU, fails on x64.
Is there anything else I should be initializing? |
|