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

a implementation question of the C# Tool API

Forums › TWAIN Classic › a implementation question of the C# Tool API

  • This topic has 1 reply, 2 voices, and was last updated 6 years, 8 months ago by MarkM.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • May 15, 2014 at 2:52 pm #22947 Reply
    jronald
    Participant
    • Topics - 2
    • Replies - 1
    • Total Posts - 3

    in TWAINWorkingGroupToolkit.ScanCallback, there is no to do with DG_CONTROL/DAT_PENDINGXFERS/MSG_ENDXFER, why?

    May 20, 2014 at 3:04 pm #26142 Reply
    MarkM
    Participant
    • Topics - 1
    • Replies - 135
    • Total Posts - 136

    There are updates coming for the project, including changes that help make ScanCallback easier to use, like an unambiguous indication about the end of a scanning session, and access to the filename when file transfers are being used. I just need time to upload them…

    The Toolkit layer is a convenience library. As such it tries to hide as much unnecessary detail from the application layer as possible. There’s no reason for an application writer to have to worry about making that call. Having said that, the following does appear inside of the ScanCallback function…

    ***********************
    // Tell TWAIN that we’re done with this image, this is the one place
    // that we go downstate without using the Rollback function, so that
    // we can examine the TW_PENDINGXFERS structure…
    TWAIN.TW_PENDINGXFERS twpendingxfers = default(TWAIN.TW_PENDINGXFERS);
    sts = m_twain.DatPendingxfers(TWAIN.DG.CONTROL, TWAIN.MSG.ENDXFER, ref twpendingxfers);
    if (sts != TWAIN.STS.SUCCESS)
    {
    WriteOutput(“Scanning error: ” + sts + Environment.NewLine);
    m_twain.Rollback(m_stateAfterScan);
    ShowImage(CvtSts(sts),null,null);
    return (TWAIN.STS.SUCCESS);
    }
    ***********************

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: a implementation question of the C# Tool API
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.