Home › Forums › TWAIN Classic › IF scanner is not connected to computer…
- This topic has 3 replies, 2 voices, and was last updated 16 years, 1 month ago by davidyantz.
- AuthorPosts
Hello everyone.
If I try to use MSG_OPENDS option while scanner is not physically connected to the computer’s usb port, a windowed error occures like this:
“Perhaps device is not connected properly. Check if device cable disconnected”.I use ScanGear for Canon Lide series scanner. I think twain_32.dll does not bring up this dialog because I coudn’t find any matching strings like above within it’s executable body. So, I’ve decided that ScanGear itself raises that dialog (ScanGear has many-many files contained, and I was too lazy to find that error string within them)
And here comes question: how with the use of twain_32.dll I can detect this erroneous situation? Can I exactly be sure scanner is physically connected to the computer?
Thanks a lot
simple answer: you can’t
workaround/solution: you write a boxeater that watches for the known dialog (you know the text + you know the button ~= you know the dialog) and send the known response to the dialog.
drawbacks: it’s lame. (but it does work…)slightly more complex answer that looks better in the beginning but proves to be useless across more vendors: there is a capability in the twain spec to see if the device is online ( search the forum and/or the spec for ‘online’) but with 99.72% of the devices I’ve tested it with it doesn’t do any good.
write a boxeater.
.
and yeah – it’s the driver not twain_32 popping(pooping?) that dialog on you
solution #2: write the device vendor and your congressman, tell them you don’t like the dialog. sometimes they have another driver. a brilliant example is that most Hp scanners have another driver on the Cd with either the world “commercial” or “minimal” in the name. Those driver play much nicer with twain.
.
Thanks for help, gabe.
- AuthorPosts