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

IF scanner is not connected to computer…

Forums › TWAIN Classic › IF scanner is not connected to computer…

  • This topic has 3 replies, 2 voices, and was last updated 13 years, 1 month ago by davidyantz.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • February 28, 2008 at 11:27 am #22296 Reply
    davidyantz
    Participant
    • Topics - 1
    • Replies - 1
    • Total Posts - 2

    Hello everyone.

    If I try to use MSG_OPENDS option while scanner is not physically connected to the computer’s usb port, a windowed error occures like this:

    “Perhaps device is not connected properly. Check if device cable disconnected”.

    I use ScanGear for Canon Lide series scanner. I think twain_32.dll does not bring up this dialog because I coudn’t find any matching strings like above within it’s executable body. So, I’ve decided that ScanGear itself raises that dialog (ScanGear has many-many files contained, and I was too lazy to find that error string within them)

    And here comes question: how with the use of twain_32.dll I can detect this erroneous situation? Can I exactly be sure scanner is physically connected to the computer?

    Thanks a lot

    February 28, 2008 at 3:55 pm #24389 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    simple answer: you can’t
    workaround/solution: you write a boxeater that watches for the known dialog (you know the text + you know the button ~= you know the dialog) and send the known response to the dialog.
    drawbacks: it’s lame. (but it does work…)

    slightly more complex answer that looks better in the beginning but proves to be useless across more vendors: there is a capability in the twain spec to see if the device is online ( search the forum and/or the spec for ‘online’) but with 99.72% of the devices I’ve tested it with it doesn’t do any good.

    write a boxeater.

    .

    February 28, 2008 at 3:58 pm #24390 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    and yeah – it’s the driver not twain_32 popping(pooping?) that dialog on you

    solution #2: write the device vendor and your congressman, tell them you don’t like the dialog. sometimes they have another driver. a brilliant example is that most Hp scanners have another driver on the Cd with either the world “commercial” or “minimal” in the name. Those driver play much nicer with twain.

    .

    February 29, 2008 at 5:23 am #24391 Reply
    davidyantz
    Participant
    • Topics - 1
    • Replies - 1
    • Total Posts - 2

    Thanks for help, gabe.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: IF scanner is not connected to computer…
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

  • TWAIN for dental imaging integration
  • PDF/R For who and where?
  • Making searchable PDF with PDF/R
  • Backward compatibility with PDF/A and traditional PDF
  • could not open the twain source. Make sure there is a valid source for your sca
  • 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.