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

TWAIN 2.x driver and 1.x Application

Forums › TWAIN Classic › TWAIN 2.x driver and 1.x Application

  • This topic has 5 replies, 3 voices, and was last updated 7 years, 6 months ago by MarkM.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • July 23, 2013 at 4:54 pm #22870 Reply
    xdaiana
    Participant
    • Topics - 3
    • Replies - 6
    • Total Posts - 9

    Hello,

    I hope this is not a duplicate/triplicate question….. didn’t manage to find any answer here.

    I’m working on a driver that should be TWAIN 2.x compliant.

    Which is the correct way for a 2.x compliant driver to interact with a 1.x application? First of all, is it allowed? I suppose yes, but…
    If I understood well, a 2.x driver HAS to be able to interact with both DSM (twaindsm.dll and twain_32.dll). Is there a sample application to illustrate this?
    The major differences I noticed up to now were the DSM file and the memory management functions. And, of course, the new capabilities. Did I miss something? Is there something I should be specially careful about?

    Thank you
    Daiana

    July 24, 2013 at 6:04 am #25946 Reply
    Catherine Sea
    Participant
    • Topics - 0
    • Replies - 59
    • Total Posts - 59

    Hi Daiana,

    >If I understood well, a 2.x driver HAS to be able to interact with both DSM (twaindsm.dll and twain_32.dll). Is there a sample application to illustrate this?

    You can download and play with the TWAIN sample data source and app to see how it works.

    Catherine Sea
    http://www.dynamsoft.com – web based TWAIN scanning SDK

    July 24, 2013 at 8:51 am #25947 Reply
    xdaiana
    Participant
    • Topics - 3
    • Replies - 6
    • Total Posts - 9

    thank you!

    July 25, 2013 at 11:54 am #25948 Reply
    MarkM
    Participant
    • Topics - 1
    • Replies - 135
    • Total Posts - 136

    Just a couple of notes about 2.x vs 1.x

    – There are no special changes in the communication between the application and the driver, there are changes in the way the application and the driver interact with the Data Source Manager, but only for TWAINDSM not for TWAIN_32; TWAIN _32 is legacy code that hasn’t changed in any meaningful way since about 2002.

    – Declaring a TW_IDENTITY.ProtocolMajor of 2 is not enough to get an application recognized as a TWAIN 2.x complaint, this is because the TWAIN Working Group recognized that application and driver writers sometimes drop in a new twain.h file without fully investigating the consequences.

    – If an application wants to declare itself as TWAIN 2.x ready it needs to set the TW_IDENTITY.ProtocolMajor to 2 and it must add the DF_APP2 flag to its TW_IDENTITY.SupportedGroups.

    – When this is done the application is expected to issue DG_CONTROL / DAT_ENTRYPOINT / MSG_GET to the DSM while in state 3, this returns pointers to functions that the app can use for managing memory.

    In all instances a 2.x app is expected to work with any TWAIN driver, no matter what version of TWAIN its using…

    July 25, 2013 at 1:14 pm #25949 Reply
    xdaiana
    Participant
    • Topics - 3
    • Replies - 6
    • Total Posts - 9

    but is a 1.x application also supposed to work with any driver?

    July 25, 2013 at 1:17 pm #25950 Reply
    MarkM
    Participant
    • Topics - 1
    • Replies - 135
    • Total Posts - 136

    Yes it is…TWAIN is designed to allow any version application to work with any version driver. That means that a 1.5 app can run a 2.2 driver, and 2.2 app can run a 1.5 driver…

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: TWAIN 2.x driver and 1.x Application
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.