Question

I am using TWAIN in a C++ program to control an Epson scanner, and have most things working as intended, with one exception:

When the scanner is not turned on, and a scan command is sent I get an error window from Epson Scan: "Cannot communicate with the scanner. Make sure the scanner is turned on (etc)".

Rather than rely on this I would like to check that the scanner is turned on on launch of my program. Is there a way (using TWAIN or not - perhaps a scan of connected, powered-on USB devices?) of achieving this?

Was it helpful?

Solution 2

I found this project:

EnumDevices project

on CodeForge which I was able to cannibalise for my needs. I was able to use the logic to generate a list of CStrings containing device names, then just ran through that looking for "EPSON Scanner".

OTHER TIPS

I'm afraid this is not achivable with TWAIN. However, you can check with Epson and see if they provide related API to detect / control the error window in their TWAIN driver, so that you can better manage the error display.

Here is a similar discussion you can check out.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top