I am struggling with WIA. I have 2 scanners connected to the same computer and I'm writing an app (VB.net) to scan from scanner 1, then scanner 2, then scanenr1 again.
WIA is happy to select scanner2 after scanner 1 but refuses to come back to scanner 1 after scanner 2. It looks like scanner 1 was "locked" ? after its first use. Is it possible to unlock/reset/disconnect a WIa device in VB so the I can come back later on scanner 1 ?
I already tried :
scanner.disconnect
scanner.dispose
scanner.closes
scanner.disconnect()
scanner.dispose()
scanner.close()
they all generate an error message,
I also tried
scanner=nothing
at the end of the loop and
System.Runtime.InteropServices.Marshal.ReleaseComObject(scanner)
These last two do not generate any error but do not solve the problem.
I can't imagine that there would be a .connect function without its counter part to disconnect the device ! ?
Does anyone have an idea on how to unlock or disconnect a scanner with WIA in VB.net > thanks