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

How do you determine if a scanner is powered on or not

Forums › TWAIN Classic › How do you determine if a scanner is powered on or not

  • This topic has 2 replies, 2 voices, and was last updated 13 years, 10 months ago by CCS.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • March 2, 2007 at 8:36 pm #22099 Reply
    CCS
    Participant
    • Topics - 1
    • Replies - 1
    • Total Posts - 2

    I am using VB.net and I am trying to get my application to determine if the scanner is online. I have tried using the isTWAINavailable as follows:

    If LEAD1.IsTwainAvailable(LEAD1.hWnd) Then

    …

    oddly enough that same/similar code works in VB6 as outlined below:

    If LEAD1.IsTwainAvailable(hWnd) Then

    …

    Let me know if I am missing something or if there is a better way of doing this.

    March 5, 2007 at 4:12 pm #23627 Reply
    dpenney
    Participant
    • Topics - 3
    • Replies - 66
    • Total Posts - 69

    @CCS wrote:

    I am using VB.net and I am trying to get my application to determine if the scanner is online.

    I’m not familiar with the VB library you are using but it should provide a way to query capabilities via the DG_CONTROL/DAT_CAPABILITY/MSG_GET triplet. CAP_DEVICEONLINE will tell you if the scanner is online. Read about that capability, and capabilities in general, in the TWAIN specification.

    March 5, 2007 at 5:38 pm #23628 Reply
    CCS
    Participant
    • Topics - 1
    • Replies - 1
    • Total Posts - 2

    I guess it would help to mention that I am using LEADTOOLS library 12.0 which seemingly does not have any appearant DG_CONTROL/DAT_CAPABILITY/MSG_GET triplet. Unless this is stored in a separate file kind of like the *.ini settings file the TWAIN driver creates for my Fujitsu Scanner then I have no clue where to find these settings. I will keep tearing through the attribute library to see what I can find.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: How do you determine if a scanner is powered on or not
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

  • Girls of Desire: All babes in one place, crazy, art
  • 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.
  • 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.