• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 500
  • Last Modified:

Twain instructions(LeadTools 11.0) unable to control HP ScanJet 6350CXi

I am a programmer using Visual C++ and
LeadTools 11.0.
In the code, I use
..............
m_Lead1.SetEnableTwainAutoFeed (FALSE);
m_Lead1.SetEnableTwainFeeder (FALSE); m_Lead1.TwainRealize((OLE_HANDLE)m_hWnd);
.............. to  disable the ADF(automatic document feeder).

However, it will not work.  
If there is paper ready to be scaned at ADF and scan glass.  The scanner will
still scan through the ADF instead of
the scan glass although I already set
the feeder off (with the code above).

Thanks...

0
zenchiu
Asked:
zenchiu
1 Solution
 
nils pipenbrinckCommented:
I remember having these problems myself a couple of years ago.. I was writing a graphic client which implemented scanning from twain interfaces.

I can tell you, that even if the Autofeed things are supported the manufacturers of the twain drivers have their own oppinions about the options you pass to the scanner.

After all scanning was easy and painless as long as you uses the user-interface. But if you want to configure the scanner using twain you'll find out, that they either ignore what you tell them or just do what they want. Most of the time they don't even return an error. I programmed the scanner the "hard way" using direct TWAIN calls. (It's a bad designed interface btw).

I even hooked myself into the twain32.dll and logged the calls from other twain compatible applications just to see how they do it (some programs where able to do things I wasn't to). To my surprise they sent out undefined commands to the scanner. It looks like some of the manufacturers (hello hp!) have a undocumented interface to their machines and only tell this to the "big companies".

so. my answer is, that you have to live with the problem. it's a driver bug.. it'll work on a lot of other scanners, but your's seems to ignore this hint.

Bye,
  Nils Pipenbrinck
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now