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

Force Reset

Forums › TWAIN Classic › Force Reset

  • This topic has 1 reply, 2 voices, and was last updated 13 years ago by gabe.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • January 23, 2008 at 4:42 pm #22278 Reply
    ZiggyShort
    Participant
    • Topics - 4
    • Replies - 16
    • Total Posts - 20

    In debugging, sometimes I stop my scan program and suspect I am leaving the scanner in a non-initial state, so when I go to rerun the program I fail to communicate with the scanner.

    How do I:

    1. Determine which state I am at?
    2. Force a state reset, regardless of where I’m at?

    Also: is there a handy summary of all possible DSM_Entry triplets anywhere?

    January 23, 2008 at 7:43 pm #24315 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    sometimes I stop my scan program and suspect I am leaving the scanner in a non-initial state, so when I go to rerun the program I fail to communicate with the scanner.

    you shouldn’t do that.

    How do I:
    1. Determine which state I am at?

    you track it by hand. I use a member variable. it’s tedious, and the #2 problem that everyone using NetMasters code suffers through if they really want to program with twain using his interop sample.

    2. Force a state reset, regardless of where I’m at?

    the power switch on the scanner (and occasionally the one on your workstation). Short of a power button my exit routine typically calls
    Control/UserInterface/DisableDs, Control/Ident ity/CloseDS() &
    Control/Parent/CloseDSM() but then I also track the twState and havent run into a situation where I need to force reset where anything short of a power button righted the wrongs. But to be fair, if devices act flaky I don’t continue to use them. Time costs more than hardware in the midrange scanner class.

    Also: is there a handy summary of all possible DSM_Entry triplets anywhere?

    I thought the twain spec was pretty handy, your mileage may vary. Personally the last section of chapter 7 is my favorite.

    .

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Force Reset
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.