0

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?

technorabble
  • 391
  • 7
  • 16

2 Answers2

1

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.

Community
  • 1
  • 1
Rachel
  • 1,372
  • 1
  • 8
  • 11
0

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".

technorabble
  • 391
  • 7
  • 16