I have the same problem and I test with your code and itīs run ok on Windows 7 and hp LaserJet 570 scanner using adf, but the same code return error in Windows 10, when it try to capture the second...