Home › Forums › TWAIN Specification › TWAIN 2.4 Specification › TWAIN_SetCurrentResolution(100)
- This topic has 1 reply, 1 voice, and was last updated 1 year, 2 months ago by .
- AuthorPosts
- CESAR ARDILA
Hi.
I am using Twain Classic Free and I need to scan many pages and set the scanning resolution before, so the user dont have to set it manually.
But when I set it I got an error “Attempt to set capability outside State 4”. What can I do?Thnaks
markmBased on the call I’m assuming you’re using EXTWAIN. The TWAIN_SetCurrentResolution(100) call needs to be made after the source has been opened (TWAIN_OpenDefaultSource()), but before any attempt is made to capture images or bring up the scanner’s user interface.
The error is indicating that an attempt was made to set a capability (resolution) in a state other than 4. When the driver’s user interface is up you’re in state 5. If you are scanning, you’re in states 6 and 7. You’re in state 4 immediately after the driver is opened.
- AuthorPosts