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

Scanner Messages do not arrive in MFC

Forums › TWAIN Classic › Scanner Messages do not arrive in MFC

  • This topic has 3 replies, 2 voices, and was last updated 11 years, 7 months ago by ancient_nerd.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • January 24, 2009 at 6:30 am #22456 Reply
    ancient_nerd
    Participant
    • Topics - 1
    • Replies - 2
    • Total Posts - 3

    I am writing a Dialog Based VC++6.0 MFC application and trying to talk to an HP Scanject 3970. When I send ENABLEDS, I geet a good return code, The scanners UI pops up and scans a preview like it should. When I press the accept button in the UI, it should start the real scan, but nothing happens.
    In my override of PretranslateMessage by setting the right breakpoint, I can tell that DG_CONTROL, DAT_EVENT, MSG_PROCESSEVENT always returns TWRC_NOTDSEVENT. It looks like the scanners messages must be getting lost somewhere.
    Is it okay to set my TW_USERINTERFACE’s hParent to the m_hWnd field of my CDialog directly? Or is there something else I need? It looks like:

    CWnd &wnd
    TW_USERINTERFACE m_ui;
    m_ui.hParent = wnd.m_hWnd;
    m_ui.ShowUI = mode != dis_ui;
    m_ui.ModalUI = mode == modal_ui;
    TW_UINT16 rc = mfp_dsm (&m_app, &m_src, DG_CONTROL, DAT_USERINTERFACE, MSG_ENABLEDS, &m_ui);

    January 25, 2009 at 10:11 pm #24783 Reply
    ancient_nerd
    Participant
    • Topics - 1
    • Replies - 2
    • Total Posts - 3

    It turns out that there are two different versions of twain_32.dll on my system. The LoadLibrary Call in the Twain Specification finds C:/Windows/System32/twain_32.dll. The scanner was trying to send XferReady by loading the newer version, C:/Windows/twain_32.dll.

    June 4, 2009 at 3:06 am #24784 Reply
    mlcarey
    Participant
    • Topics - 0
    • Replies - 2
    • Total Posts - 2

    @ancient_nerd wrote:

    It turns out that there are two different versions of twain_32.dll on my system. The LoadLibrary Call in the Twain Specification finds C:/Windows/System32/twain_32.dll. The scanner was trying to send XferReady by loading the newer version, C:/Windows/twain_32.dll.

    How did you resolve this problem?

    June 4, 2009 at 4:13 am #24785 Reply
    ancient_nerd
    Participant
    • Topics - 1
    • Replies - 2
    • Total Posts - 3

    I renamed the older version of twain_32.dll to something else. When the LoadLibrary call did not find it in Windows/System32, the next place for it to look is C:/Windows.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Scanner Messages do not arrive in MFC
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.