TWAIN Working Group

Newsletter Signup
Donate
Help keep TWAIN free
  • About TWAIN
    • What’s New?
    • News
    • Events
    • Membership
    • Consider a Donation
    • Contact Us
  • Why TWAIN?
  • Developers
    • Driver Developer
    • Application Developer
    • TWAIN Features
    • Specification & Tools
    • Self Certification Process
  • Support Forums
  • Scanner End-User
  • Find Certified Drivers
    • Facebook
    • LinkedIn
    • Vimeo

CAP_FEEDERENABLED expected behavior

Forums › TWAIN Classic › CAP_FEEDERENABLED expected behavior

  • This topic has 4 replies, 2 voices, and was last updated 7 years, 1 month ago by xdaiana.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • December 4, 2013 at 10:31 am #22900 Reply
    xdaiana
    Participant
    • Topics - 3
    • Replies - 6
    • Total Posts - 9

    Hello,
    I need some help in understanding the expected behavior in the following situation:
    – the application sets CAP_FEEDERENABLED = true (if I understand well that means the driver HAS TO scan from the ADF and not from flatbed)
    – data source was enabled with ShowUI = false
    – there is no paper in the ADF

    What is the driver supposed to do (in both CAP_INDICATORS true or false)?
    a) show an error message (MessageBox) asking if the user wants to scan from flatbed
    b) silently scan from flatbed
    c) return an error

    Thank you

    December 4, 2013 at 5:25 pm #26034 Reply
    dpenney
    Participant
    • Topics - 3
    • Replies - 66
    • Total Posts - 69

    Hi xdaiana,

    If you are developing a DS, it’s best to prompt the user to load the feeder. Then start the scan if they click “OK” with paper loaded or return an error if they click “Cancel”. CAP_INDICATORS only controls progress indicators; it is not relevant in this situation. Please see the section in the specification titled “Error and Device Control Indicators”.

    If you are developing an application and would prefer to avoid this situation, check CAP_FEEDERLOADED before enabling the DS.
    —

    December 5, 2013 at 3:16 pm #26035 Reply
    xdaiana
    Participant
    • Topics - 3
    • Replies - 6
    • Total Posts - 9

    Sorry, I forgot to specify: Yes, I am developing a DS.
    I mentioned CAP_INDICATORS because the specs say if this one is false and ShowUI also, then the driver should not show any UI elements on its own. Means possibility a) is not acceptable under this circumstances.

    “If the Source user interface is not displayed, and the Application sets CAP_INDICATORS to FALSE, then the Source is not allowed to display any kind of user interface, progress indicator or error dialog. All UI activity must be suppressed.“

    When the UI is shown, then I also think that prompting the user is the best option.

    Thanks,
    Daiana

    December 5, 2013 at 3:58 pm #26036 Reply
    dpenney
    Participant
    • Topics - 3
    • Replies - 66
    • Total Posts - 69

    Hi Daiana,

    That’s interesting. I did some digging. Here’s what I’ve found.

    TWAIN spec 2.1 says:

    While the Source’s user interface is raised, the Source is responsible for presenting the user with appropriate progress indicators regarding the acquisition and transfer processes unless the application has set CAP_INDICATORS to FALSE. The Source must also report errors to the user (without regard for the settings of CAP_INDICATORS and ShowUI, i.e. they may be set to FALSE and errors still must be reported)

    My emphasis added.

    I was going on that information but, as you pointed out, spec 2.2 says:

    If the Source user interface is not displayed, and the Application sets CAP_INDICATORS to FALSE, then the Source is not allowed to display any kind of user interface, progress indicator or error dialog. All UI activity must be suppressed.

    This very recent change to the spec makes your original question a good one. In the case of an empty feeder, it looks like MSG_ENABLEDS should return TWRC_FAILURE/TWCC_NOMEDIA. But what if showUI is FALSE, CAP_INDICATORS is FALSE, and some other device error occurs? Perhaps return TWRC_FAILURE/TWCC_OPERATIONERROR even though the DS did not handle the error.

    That’s my interpretation of the spec. Anyone else care to weigh in on this?
    —

    December 5, 2013 at 4:15 pm #26037 Reply
    xdaiana
    Participant
    • Topics - 3
    • Replies - 6
    • Total Posts - 9

    Thank you. I didn’t read the 2.1 specs, only the 2.2 ones. At least that means the DS is standard compliant (it has the message box asking for paper in ADF), but not 2.2.

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: CAP_FEEDERENABLED expected behavior
Your information:




Quick Links

Service Providers
TWAIN Support Forums
Membership
Contact Us
Privacy Policy

Newsletter Signup

TWAIN Working Group Family

TWAIN Working Group
TWAIN Direct®
TWAIN Resources
TWAIN Certified Drivers
PDF/raster

  • Facebook
  • GitHub
  • LinkedIn
  • Vimeo

Recent Topics

  • Girls of Desire: All babes in one place, crazy, art
  • EPSON V600 TWAIN and WIA on Windows 10
  • When and how to use WaitForEvents command ?
  • Problem enumerating list of installed scanners in windows server 2012
  • Failed to create TWAIN progress! Error code is 1260.
  • Quarterly Newsletter
  • TWAIN Working Group Membership
  • Logo Usage
  • TWAIN License
  • Contact Us
Privacy Policy • Privacy Tools • Copyright © 2021 TWAIN Working Group • by iHwy, LLC • Log in

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.