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

DSM 2.0 does not work with DS 1.9 on Windows 7

Forums › TWAIN Classic › DSM 2.0 does not work with DS 1.9 on Windows 7

  • This topic has 4 replies, 2 voices, and was last updated 11 years, 6 months ago by jimwatters.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • July 16, 2009 at 7:27 am #22512 Reply
    Dmitry Smirnov
    Participant
    • Topics - 1
    • Replies - 3
    • Total Posts - 4

    It’s found that 32-bit TWAIN 2.0 application cannot scan using legacy TWAIN drivers (v. 1.9 and earlier) on Windows 7 (32-bit). However same 32-bit TWAIN 2.0 application and DS 1.9 work well on Vista (both 32- and 64-bit).

    It can be reproduced with test TWAIN 2.0 Sample Application and latest DSM v. 2.0.7.1.

    Investigations showed that trick with hooking LdrGetProcedureAddress does not work on Windows 7. Thus DSM 2.0 cannot catch MSG_XFERREADY event from DS. As result DS calls DSM 1.9 (Twain_32.dll) which reasonably returns error and DS reports error as well. Thus TWAIN 2.0 application does not receive MSG_XFERREADY event at all.

    Has anybody tested TWAIN 2.0 applications with legacy DS on Windows 7?!

    July 16, 2009 at 10:16 am #24967 Reply
    Dmitry Smirnov
    Participant
    • Topics - 1
    • Replies - 3
    • Total Posts - 4

    We found that in Windows 7 implementation of major functions is moved from “kermel32.dll” to “kernelbase.dll”. Thus it’s “kernelbase.dll” which calls “LdrGetProcedureAddress” from ntdll.dll. For more details see http://www.nirsoft.net/articles/windows_7_kernel_architecture_changes.html

    So on Windows 7 DSM should hook “kernelbase.dll” instead of “kermel32.dll”.
    In our tests following fix of hook.cpp [CTwHook::Hook(), line #360] resolved the issue:
    //hmodule = GetModuleHandle(“kernel32.dll”);
    hmodule = GetModuleHandle(“kernelbase.dll”); //Windows 7

    Of course, regular DSM needs a little bit more complex code to distinguish Windows 7 case, etc..

    Hope that above information will help to fix and release next verison of DSM soon.

    July 16, 2009 at 8:39 pm #24968 Reply
    jimwatters
    Participant
    • Topics - 2
    • Replies - 72
    • Total Posts - 74

    Thank you for the bug report and info to resolve it.

    Regards,
    Jim Watters

    **************************************************
    JFL Peripheral Solutions Inc.
    http://www.jflinc.com/
    Your Expert Source of Custom Software and Services
    for TWAIN Applications, Data Sources,
    Peripheral Drivers and Support Software.
    **************************************************

    July 30, 2009 at 7:04 am #24969 Reply
    Dmitry Smirnov
    Participant
    • Topics - 1
    • Replies - 3
    • Total Posts - 4

    Is there any information about planned updates of TWAIN DSM regarding the problem with Windows 7 and “legacy” data sources?
    I appreciate if anybody can answer.

    August 20, 2009 at 8:37 pm #24970 Reply
    jimwatters
    Participant
    • Topics - 2
    • Replies - 72
    • Total Posts - 74

    This has been resolved with version 2.0.9 of the DSM.
    https://sourceforge.net/projects/twain-dsm/files/

    At this time the sample TWAIN 2.0 App and DS have not been updated to use version 2.0.9 of the DSM.

    Regards,
    Jim Watters

    **************************************************
    JFL Peripheral Solutions Inc.
    http://www.jflinc.com/
    Your Expert Source of Custom Software and Services
    for TWAIN Applications, Data Sources,
    Peripheral Drivers and Support Software.
    **************************************************

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: DSM 2.0 does not work with DS 1.9 on Windows 7
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

  • could not open the twain source. Make sure there is a valid source for your sca
  • Changing TWAIN driver defaults
  • Scanner starts transfer when console gets closed (CITRIX)
  • Kodak RFS 3600
  • Didn’t save enough file scan
  • 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.