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

Windows 8.1 and Visual studio 2013 fails on CloseDS

Forums › TWAIN Classic › Windows 8.1 and Visual studio 2013 fails on CloseDS

  • This topic has 1 reply, 2 voices, and was last updated 6 years, 11 months ago by MarkM.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • February 10, 2014 at 7:11 pm #22922 Reply
    meerawisniewski
    Participant
    • Topics - 2
    • Replies - 0
    • Total Posts - 2

    I have used twain library to scanning my document in my application and its worked just fine in windows 7. After the upgrade to windows 8.1, i have been getting this error on CloseDS “Attempted to read or write protected memory” has occurred. Twain is trying to close communication with scanner by accessing CloseDS memory bit (0x0402). Anyone else has encounter this problem? if i change the Message.CloseDS to Message.CloseDSOk. it works fine.

    result = Twain32Native.DsmIdentity(
    _applicationId,
    IntPtr.Zero,
    DataGroup.Control,
    DataArgumentType.Identity,
    Message.CloseDS,
    SourceId);

    Thank you very much in advance

    February 17, 2014 at 9:43 pm #26087 Reply
    MarkM
    Participant
    • Topics - 1
    • Replies - 135
    • Total Posts - 136

    There are three likely possibilities:

    – the application has done something to memory that is causing the DSM or the driver to crash
    – the DSM has a problem
    – the driver has a problem

    If the application is using TWAIN_32.DLL, then the easiest thing to try first is to switch to TWAINDSM.DLL and see if that resolves the problem. This is the newer, fully supported DSM maintained by the TWAIN Working Group. TWAIN_32.DLL is a legacy binary that is no longer under the control of the TWG. You can get the newer DSM here: http://sourceforge.net/projects/twain-dsm/

    Using it is easy, just install it and switch from using TWAIN_32.DLL to TWAINDSM.DLL. The newer DSM is 100% compatible with all TWAIN applications and drivers of any version. It’s also open source, so you can debug into it.

    If that doesn’t resolve the problem, then try running a different TWAIN application. If the problem reproduces, then it’s likely that the driver has a problem. Contact the scanner manufacturer for help.

    If the problem does not reproduce with a different application, then it might be a problem with your application. In that case turn on logging for the TWAINDSM.DLL (set the TWAINDSM_LOGPATH environmental variable to a valid path and file name), and compare the calls made by your application to the ones made by the other application. There may be clues as to what’s going on.

    Good luck…

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Windows 8.1 and Visual studio 2013 fails on CloseDS
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.