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

Re: Re: Detecting pressing scan button in the scanner

Forums › TWAIN Classic › Detecting pressing scan button in the scanner › Re: Re: Detecting pressing scan button in the scanner

September 28, 2006 at 4:56 pm #23485
dpenney
Participant
  • Topics - 3
  • Replies - 66
  • Total Posts - 69

@darkride wrote:

How can i detect action of pressing scan button on the device?
Twain sepcyfication allows for it?
thx

You probably have to contact the vendor of the scanner that you want to support to find out how, or if, the device supports this via TWAIN. I’m guessing most vendors don’t support it.

The only thing I see in the specification that seems to fit is CAP_DEVICEEVENT/TWDE_DEVICEREADY or possibly a vendor-specific event using TWDE_CUSTOMEVENTS.

On Windows, the STI (STill Image) interface supports a way to launch an application when the scanner button is pressed. Here’s how to see if your device supports this OS-specific feature:

1) Go into Control Panel->Scanners and Cameras.
2) Right-click on the scanner and select Properties.
3) If the Properties window has an “Events” tab, the device does support STI events. Check that one of the events is a button press.

Here’s how to register your application as an STI event handler:

http://msdn.microsoft.com/library/en-us/stillimg/sti_1gyt.asp

And detect when an STI event has caused your app to be launched:

http://msdn.microsoft.com/library/en-us/stillimg/sti_7wbp.asp

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