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

TWAIN interface hanging while clicking on scan

Forums › TWAIN Classic › TWAIN interface hanging while clicking on scan

  • This topic has 1 reply, 2 voices, and was last updated 7 years, 10 months ago by MarkM.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • March 12, 2013 at 1:43 pm #22832 Reply
    kannanprathesh
    Participant
    • Topics - 5
    • Replies - 1
    • Total Posts - 6

    I am getting the list of scanner installed and I can select the scanner and the scan window appears (twain driver window). In the scan window I can preview the document and change the settings.But when I click SCAN button .. the application hangs..

    what am I doing wrong..Do I need to do any coding for the scan button..
    which twain method I have to call .. as well as any parameters to be passed…

    March 12, 2013 at 7:37 pm #25836 Reply
    MarkM
    Participant
    • Topics - 1
    • Replies - 135
    • Total Posts - 136

    I’m assuming this is on some version of Windows…

    Your scanning application should be waiting for a DG_CONTROL / DAT_NULL / MSG_XFERREADY message. This is sent from the TWAIN driver to the Data Source Manager (DSM), which forwards it on to the application.

    The application retrieves the event either through calls to DG_CONTROL / DAT_EVENT / MSG_PROCESSEVENT (old style – TWAIN_32.DLL or TWAINDSM.DLL), or through a callback function registered using DG_CONTROL / DAT_CALLBACK / MSG_REGISTER_CALLBACK (TWAINDSM.DLL only).

    TWAIN_32.DLL is an old DSM that comes with every version of Windows since Windows 98. TWAINDSM.DLL is an open source project maintained by the TWAIN Working Group. Any TWAIN driver or application can used the supplied .msi file referenced through twain.org to install this version of the DSM.

    If your application is using TWAIN_32.DLL with the MSG_PROCESSEVENT method, then the following conditions need to be followed for successful receipt of MSG_XFERREADY…

    – the window handle supplied to MSG_OPENDSM and MSG_ENABLEDS much match the window event loop monitoring for MSG_XFERREADY…

    – all TWAIN commands should original from the same thread that issued MSG_OPENDSM, and this should be the same thread that creates the window handle described in the previous statement…

    The callback mechanism is less restrictive in that a window handle isn’t needed for receipt of MSG_XFERREADY, though it’s still true that all TWAIN commands should originate in the same thread…

    Hope that helps…

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: TWAIN interface hanging while clicking on scan
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

  • Big Ass Photos – Free Huge Butt Porn, Big Booty Pics
  • 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.