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

Problem running on Window 8.1

Forums › TWAIN Classic › Problem running on Window 8.1

  • This topic has 5 replies, 2 voices, and was last updated 6 years, 6 months ago by Eugene.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • May 12, 2014 at 11:42 am #22944 Reply
    TOR
    Participant
    • Topics - 7
    • Replies - 11
    • Total Posts - 18

    Hi all,

    I’m getting an exception when trying to run my application on a Windows 8.1 64-bit machine.

    The messages is as follows

    “Attempted to read or write protected memory. This is often an indication that other memory is corrupt”.

    It works fine on Windows 7 64-bit.

    The twain log is as follows. I’m not too familiar what the log message means.

    Any help would be appreciated and thanks in advance.

    TWAIN_32.DLL – MESSAGE – CTwunk ::AppInitialize – Reset Log

    TWAIN_32.DLL – MESSAGE – CTwunk ::OpenServer – Starting Thunker

    TWAIN_32.DLL – MESSAGE – CTwunk ::CloseServer – Why Can’t We Find The Thunker Window?

    TWAIN_32.DLL – MESSAGE – DSM –DsmEntryDiagExit (RC = 0, CC = 0)

    TWAIN_32.DLL – MESSAGE – CTWTRACE–TwainDotNet(55) to NULL:

    TWAIN_32.DLL – MESSAGE – CTWTRACE–CONTROL, IDENTITY, GETDEFAULT

    TWAIN_32.DLL – MESSAGE – DSM –DsmEntryDiagExit (RC = 0, CC = 0)

    TWAIN_32.DLL – MESSAGE – CTWTRACE–TwainDotNet(55) to NULL:

    TWAIN_32.DLL – MESSAGE – CTWTRACE–CONTROL, IDENTITY, GETFIRST

    TWAIN_32.DLL – MESSAGE – DSM –DsmEntryDiagExit (RC = 0, CC = 0)

    TWAIN_32.DLL – MESSAGE – CTWTRACE–TwainDotNet(55) to NULL:

    TWAIN_32.DLL – MESSAGE – CTWTRACE–CONTROL, IDENTITY, GETNEXT

    TWAIN_32.DLL – MESSAGE – DSM –DsmEntryDiagExit (RC = 0, CC = 0)

    TWAIN_32.DLL – MESSAGE – CTWTRACE–TwainDotNet(55) to NULL:

    TWAIN_32.DLL – MESSAGE – CTWTRACE–CONTROL, IDENTITY, GETNEXT

    TWAIN_32.DLL – MESSAGE – DSM –DsmEntryDiagExit (RC = 7, CC = 0)

    TWAIN_32.DLL – MESSAGE – CTWTRACE–TwainDotNet(55) to EPSON DS-5500/6500/7500(56):

    TWAIN_32.DLL – MESSAGE – CTWTRACE–CONTROL, USERINTERFACE, DISABLEDS

    TWAIN_32.DLL – MESSAGE – DSM –DsmEntryDiagExit (RC = 1, CC = 0)

    TWAIN_32.DLL – MESSAGE – CTWTRACE–TwainDotNet(55) to NULL:

    TWAIN_32.DLL – MESSAGE – CTWTRACE–CONTROL, IDENTITY, CLOSEDS

    TWAIN_32.DLL – MESSAGE – DSM –DsmEntryDiagExit (RC = 1, CC = C568)

    TWAIN_32.DLL – MESSAGE – CTWTRACE–TwainDotNet(55) to WIA-EPSON DS-5500/6500/7500(57):

    TWAIN_32.DLL – MESSAGE – CTWTRACE–CONTROL, USERINTERFACE, DISABLEDS

    TWAIN_32.DLL – MESSAGE – DSM –DsmEntryDiagExit (RC = 1, CC = C568)

    TWAIN_32.DLL – MESSAGE – CTWTRACE–TwainDotNet(55) to NULL:

    TWAIN_32.DLL – MESSAGE – CTWTRACE–CONTROL, IDENTITY, CLOSEDS

    May 12, 2014 at 2:24 pm #26135 Reply
    TOR
    Participant
    • Topics - 7
    • Replies - 11
    • Total Posts - 18

    Found my problem. Was due to the way the source was being closed.

    I used CloseDSOK with Windows 8 and CloseDS with Windows 7.

    May 13, 2014 at 11:38 am #26136 Reply
    TOR
    Participant
    • Topics - 7
    • Replies - 11
    • Total Posts - 18

    When closing the source with CLOSEDSOK I get another problem.

    It fails to OPENDS when closed this way.

    Anybody else run into this problem?

    May 13, 2014 at 3:13 pm #26137 Reply
    TOR
    Participant
    • Topics - 7
    • Replies - 11
    • Total Posts - 18

    The CloseDSOK is actually not working on windows 8 and the CloseDS causes a memory access issue.

    All out of ideas here.

    May 13, 2014 at 4:02 pm #26138 Reply
    TOR
    Participant
    • Topics - 7
    • Replies - 11
    • Total Posts - 18

    Ok I got it to work correctly on Windows 8 with the new TwainDSM.dll.

    New problem is that this library isn’t picking up the WIA deivces. The one default library that comes with windows does.

    Seem to be having a conversation with myself here but going to put these replies to help other people with these problems.

    July 20, 2014 at 11:49 pm #26139 Reply
    Eugene
    Participant
    • Topics - 0
    • Replies - 1
    • Total Posts - 1

    TOR, thanks for your post. I am experiencing similar issue as you had. However after I switched to twaindsm.dll, my program returns failure when try to OpenDSM. I am wondering whether the MarshalAs in the Identity struct need to be change after swtitch from twain_32.dll to twaindsm.dll. I would like apprecite any advice from you. Thanks.

    The following is part of code.

    1) Returns failure
    DSMparent(appid, IntPtr.Zero, TwDG.Control, TwDAT.Parent, TwMSG.OpenDSM, ref hwndp)

    2) Dll Import for the function
    [DllImport(“twaindsm.dll”, EntryPoint = “DSM_Entry”, CharSet = CharSet.Ansi)]
    private static extern TwRC DSMparent([In(), Out()]
    TwIdentity origin, IntPtr zeroptr, TwDG dg, TwDAT dat, TwMSG msg, ref IntPtr refptr);

    3) Definition of Identity Struct
    [StructLayout(LayoutKind.Sequential, Pack = 2, CharSet = CharSet.Ansi)]
    public class TwIdentity
    {
    // TW_IDENTITY
    public IntPtr Id;
    public TwVersion Version;
    public short ProtocolMajor;
    public short ProtocolMinor;
    public int SupportedGroups;
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 34)]
    public string Manufacturer;
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 34)]
    public string ProductFamily;
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 34)]
    public string ProductName;
    }

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Problem running on Window 8.1
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.