Closed KureninovVS closed 5 years ago
oh, and also, have on idea if this is connected, but form doesn't appear on task bar.(Using windows 10)
Hello, @KureninovVS About the AccessViolationException, likely this related with your scanner (scanner driver). About the service, see the Saraff.Twain.NET Service Samples.
Also you may see the Saraff.Twain.NET HTML Samples
If this problem part of scanner driver, does that mean it is just unsolvable issue for me? I am using CANON DR-M160II, and the is only on driver of for windows device...
Obviously the scanner driver was not ready for multithreaded calls. See the Saraff.Twain.NET Service Samples.
Okay, I'll try that ). I'll notify of my progress here
Well, apparently i stuck with no match exception(ServiceSample4): Am I missing something?(I installed Saraff.Twain.Service_x64.msi)
Из трассировки стека видно, что используемый по умолчанию источник данных (сканер) вернул пустой список поддерживаемых разрешений для сканирования (dpi).
var _caps = await this.TwainService.GetCapsAsync(_ds,new List<TwCap> { TwCap.XResolution,TwCap.IPixelType });
this._Fill<float>(this.resolutionsToolStripDropDownButton,_caps.First(val => val.Cap==TwCap.XResolution));
Соответственно метод First
выдал исключение.
Если источник данных не возвращает список поддерживаемых разрешений (dpi), то он не соответствует спецификации TWAIN. Попробуйте использовать другой драйвер для сканера.
Также вы можете проверить работу указанного сканера с помощью приложения Saraff.Twain.Sample2 (из Saraff.Twain.NET CS Samples ), я думаю результат будет тем же.
Saraff.Twain.Sample2 и Saraff.Twain.Sample1 не распознают устройство как сканер... Я установил другой дравер, но он ведет себя также... Хотя оба они себя катируют как ISIS / TWAIN Driver... Ладно, большое спасибо за помощь) я не думаю что буду дальше решать этот вопрос, просто отключу пользовательский интерфейс и поставлю нужную конфигурацию сканирования для источника
Hi, it's me again 0/. I have been using #
Twain32.Acquire()
withTwain32.IsTwain2Enable = true;
and found something strange. On "Close" and "Cancel" buttons form stucks and from time to time fires System.AccessViolationException with source "System.Windows.Forms". Found StackTrace.It is strange because if I first use "Scan" button (without paper) and then use "Cancel" or "close window" options it close smooth with no problem... Can this problem be part of what my app targeted to 4.6.1 .NET? Also I use it in service, so can there be something what i should be aware of like requirement of multithreading?