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

understand when the scanner is disconnected / unplugged?

Forums › TWAIN Classic › understand when the scanner is disconnected / unplugged?

  • This topic has 1 reply, 2 voices, and was last updated 7 years, 3 months ago by MarkM.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • October 7, 2013 at 11:02 am #22894 Reply
    nturri1306
    Participant
    • Topics - 1
    • Replies - 0
    • Total Posts - 1

    There is a damn way to understand when a scanner is disconnected? I’m using a porting c # but I’m in charge and yet there are a host of commands that do not work as possible and this, from what I read in other forums it says that it is impossible, how come we have all become crazy?

    what’s CheckStatus = 0x0201,

    i use this example
    http://www.codeproject.com/Articles/1376/NET-TWAIN-image-scanner#xx1007385xx

    October 8, 2013 at 4:29 pm #26017 Reply
    MarkM
    Participant
    • Topics - 1
    • Replies - 135
    • Total Posts - 136

    CAP_DEVICEONLINE is the capability that reports whether or not the scanner is powered on and ready for use. It’s a mandatory capability, so all TWAIN drivers are expected to support it.

    If a command fails due to loss of the device, it should return TWRC_FAILURE / TWCC_CHECKDEVICEONLINE. This isn’t mandatory, so your mileage may vary depending on the TWAIN driver. You get the condition code by calling DG_CONTROL / DAT_STATUS / MSG_GET immediately after any command that returns TWRC_FAILURE.

    If the TWAIN driver supports CAP_DEVICEEVENTS for TWDE_CHECKDEVICEONLINE, then you can get notifications when the scanner is disconnected / reconnected. Again, this isn’t going to be supported by all TWAIN drivers.

    The condition code you referred to, TWCC_CHECKSTATUS, is used to report when the driver make an adjustment to a requested setting. For example, if you set ICAP_BRIGHTNESS to 105, the driver could decide to adjust to 100 (for instance if it only supports steps of 10) and return check status to say “I made the change, but it’s not exactly what you asked for…”

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: understand when the scanner is disconnected / unplugged?
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.