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 to get twain scanners from twain device list?

Forums › TWAIN Classic › How to get twain scanners from twain device list?

  • This topic has 3 replies, 2 voices, and was last updated 6 years, 6 months ago by spike.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • July 9, 2014 at 3:15 pm #22958 Reply
    gax
    Participant
    • Topics - 2
    • Replies - 1
    • Total Posts - 3

    Hi everybody,

    I am using DelphiTwain to activate scanner from my program (Delphi XE4).

    The version of DelphiTwain is probably old one due to this comment from code:
    …{DELPHI IMPLEMENTATION OF TWAIN INTERFACE}
    {december 2003®, initially created by Gustavo Daud}…

    My task is:
    When I am listing Twain devices I get web cameras and scanner devices.
    How could I separate web cameras from scanners in two different list?

    I found only this article that much my question
    http://forums.codeguru.com/showthread.p … evice-list
    but unfortunately it didn’t answer for my question.

    Could anyone help me with this issue??

    Looking forward for your answer.

    Best Regards,
    Vasyl.

    July 9, 2014 at 6:28 pm #26163 Reply
    spike
    Participant
    • Topics - 10
    • Replies - 139
    • Total Posts - 149

    How could I separate web cameras from scanners in two different list?

    I found only this article that much my question
    http://forums.codeguru.com/showthread.p … evice-list
    but unfortunately it didn’t answer for my question.

    I looked at that thread on codeguru.com, it seems to answer your question exactly.
    It says “You can’t do that,” and he’s right.

    What’s the larger problem that this is part of?

    July 9, 2014 at 7:55 pm #26164 Reply
    gax
    Participant
    • Topics - 2
    • Replies - 1
    • Total Posts - 3

    The problem is in the specific of my program.
    My client want to split Web-Cameras and Scanners in two different forms.

    One of this form will work only and only with scanners and there user will be able only scan (using DelphiTwain).
    Other form will keep only and only web-cameras and user will be able only record video (using DirectShow).

    I am wondering if I could look in some properties(compability) of devices that actually supported only by Scanners and not supported by Web Cameras or vice versa. Is it possible?
    I am guessing: for example look at device property “device could rotate picture” – and in case when this property set to “True” or some other positive value – it’s mean SCANNER device, otherwise device is Web-Camera.

    Does it make sence?

    July 10, 2014 at 3:08 pm #26165 Reply
    spike
    Participant
    • Topics - 10
    • Replies - 139
    • Total Posts - 149

    Yes… sort of. Here are the main problems:
    1. There are no TWAIN properties that are guaranteed to appear only on cameras or only on scanners.
    (This question has come up before. Google is your friend.)
    2. To get the properties of a device, you have to open the device.
    3. When you open a device that is not powered on and connected, the TWAIN driver will display a message to the user.
    (No, you can’t prevent this.)
    4. Some TWAIN drivers (I’m lookin’ at you, Kofax…) can take up to 10 seconds to open, and almost another 10 seconds to close.

    What this means is that going through the list of TWAIN devices, and checking the properties of each one, could cause some real problems.
    You could reduce these problems by having your program remember whether a device was a scanner or camera, so it would only check the first time a device appeared in the list.

    The list of cameras in the TWAIN list isn’t the same as the list of DirectShow devices!
    Why not use DirectShow to get the list of (DirectShow) sources, and use the TWAIN list as the list of TWAIN devices?

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: How to get twain scanners from twain device list?
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.