Stop scanning if lost connection with source device

Issue #64 new
Hegyi Nikoletta created an issue

Hello!

Can you please help me out? I can not cancel scanning programatically. When I unplug the device, there's no "TransferError" on anything I can catch on. I'm getting

_twain.CurrentSource.Capabilities.CapDeviceOnline.GetCurrent()

in a while loop, and if it's false, then something happened to the source. Is there any way to completly stop the scanning process then, so the "Scanning..." window could disappear?

Thanks! Niki

Comments (2)

  1. Eugene Wang repo owner

    Theoretically this is the correct property to check, and it may even be possible to listen to the TwainSession.DeviceEvent when such important things happen. But as you have found out not all sources implements the spec completely so YMMV.

  2. Log in to comment