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

scanning from epson

Forums › TWAIN Classic › scanning from epson

  • This topic has 4 replies, 2 voices, and was last updated 12 years, 12 months ago by gabe.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • January 23, 2008 at 12:18 pm #22277 Reply
    ZiggyShort
    Participant
    • Topics - 4
    • Replies - 16
    • Total Posts - 20

    I’m testing on a few scanners and while scanning from a canon canonscan lide 20 works fine, an epson stylus dx6000 gives me a few problems.

    The problem occurs between the Control/UserInterface/EnableDS and Image/ImageInfo/Get.

    Basically the scanner’s proprietary user interface is displayed after the Control/UserInterface/EnableDS triplet, and once the user presses the scan button I reach the Image/ImageInfo/Get breakpoint in my (! mine? I nicked it!) code.

    The problem is: while clicking scan on the Canon causes the UI to return control to my program, and my breakpoint to be reached, the Epson scan button “seems” not to respond. The only way to get rid of the dialog is stop debugging the application. Is this a known issue or am I doing something wrong?

    Here is my call to EnableDS:

    TwUserInterface guif = new TwUserInterface();
    guif.ShowUI = 1;
    guif.ModalUI = 1;
    guif.ParentHand = hwnd;
    rc = DSuserif( appid, srcds, TwDG.Control, TwDAT.UserInterface, TwMSG.EnableDS, guif );

    (So the dialog IS Modal)

    January 23, 2008 at 12:24 pm #24311 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    dialogboxes are difficult. I have a thread built to watch for them and close them as they often (read:always) block twain communication when they are shown. Usually you’ll have to watch for them after EnableDs, OpenDs and EnableDsUiOnly calls.

    And ModalUi doesn’t play a role in twain on windows – unless I misremember the spec. I am almost certain that the spec says that parameter only applys to Mac development.

    .

    January 23, 2008 at 12:55 pm #24312 Reply
    ZiggyShort
    Participant
    • Topics - 4
    • Replies - 16
    • Total Posts - 20

    Do you have an example of your thread code? And how do you get the dialog to subsequently close, and the scan press to get acted upon?

    January 23, 2008 at 1:04 pm #24313 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    yup. opentwain’s monitor project.

    the basic idea is that you test the ‘profile’ and try to make the device pop any and all dialogs that may show up in production (I know it’s not perfect but how else do you get values for unknown/undocumented dialogs that kill you app?… )
    while testing, the monitor’s thread watches for dialogs that are created during critical portion of your code. If a dialog is detected, the monitor records some information about the dialog (text, buttons control Ids, etc) via some windows polling (which i wouldn’t have to do if some vendors cough*hp*cough would create thier dialogs on the smame thread) and a cbthook. after each test, open the Tools, Dialog Manager menu of the guiHarness and you’ll see the details. from there you double click on each item and you have some options for posting messages to the dialogs with the controlIds of the various CButtons that the monitor found in each dialog.
    You end up with a rule set so that later the ‘profile’ knows that if a dialog with title ‘Epson kill twain’ shows up that the monitor thread needs to post the control Id of the button named ‘no, don’t kill twain just yet’

    .

    January 23, 2008 at 1:06 pm #24314 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    and I understand that this would be easier on you if I ever got around to producing a ‘how to’ or a ‘getting started’ (or any documentation really) for opentwain, but,.. well maybe someone else will write it for me – because somehow other projects keep coming up.
    😉

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: scanning from epson
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

  • 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.
  • To get the list of scanners from javascript client side (browser)
  • 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.