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

twaindsm : start a scan in a c++ thread

Forums › TWAIN Classic › twaindsm : start a scan in a c++ thread

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • March 28, 2017 at 11:30 am #29878 Reply
    Mikael P
    • Topics - 93
    • Replies - 185
    • Total Posts - 278

    Hello,
    I am working on integrating a scanner in my software.
    I was trying to scan in a c++ thread (not a windowed thread) on a windows 7 64 system.

    When I call “enableDS(GetDesktopWindow(), FALSE))”, an error message occurs when calling “TW_UINT16 twrc = DSM_Entry(DG_CONTROL, DAT_USERINTERFACE, MSG_ENABLEDS, (TW_MEMREF)&(m_ui));”

    I think DSM needs to be called from a window because of TW_USER_INTEFACE m_ui.
    Is it possible to use scan in a thread without beeing in a window ?

    Thanks in advance,
    Mikael.

    May 4, 2017 at 6:32 am #29978 Reply
    MarkM
    • Topics - 93
    • Replies - 185
    • Total Posts - 278

    TWAIN on Windows requires a window for two reasons: to support the scanner’s GUI, by passing messages to it, and to receive DG_CONTROL / DAT_NULL / MSG_XFERREADY for scanning (and two other messages for OK/CANCEL for the GUI). It’s not the graphic that’s needed, just the message pump.

    That said, the Window can be hidden from view, so as far as the user is concerned there is no Window.

    November 14, 2017 at 11:43 pm #30708 Reply
    Johnwick88
    • Topics - 93
    • Replies - 185
    • Total Posts - 278

    thank you comment

    sbobet mobile

    สมัคร sbobet

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: twaindsm : start a scan in a c++ thread
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.