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

zenchiuAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.