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

Getting an image from scanner using twain, c++ programming

Forums › TWAIN Classic › Getting an image from scanner using twain, c++ programming

  • This topic has 2 replies, 2 voices, and was last updated 6 years, 8 months ago by denia.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • July 28, 2014 at 7:58 pm #22926 Reply
    denia
    Participant
    • Topics - 1
    • Replies - 1
    • Total Posts - 2

    Hi!

    I’m new to twain and these days I’ve been trying to figure out how to write a program in C++ using twain interface to get an image from my scanner.
    So I have a canon scanner, and drivers installed for it, I’d like to program the app in visual studio. How to link twain to the scanner? What are the steps I have to take to get this all to work?

    July 29, 2014 at 4:04 pm #26097 Reply
    MarkM
    Participant
    • Topics - 1
    • Replies - 135
    • Total Posts - 136

    Howdy…

    Your best bet is to download the TWAIN Sample Application from Source Forge.
    http://sourceforge.net/projects/twain-samples/

    If you decide to build it, you’ll need to install QT 4 on your machine. That’s needed for the sample’s user interface, you won’t need it for your project.

    The code had a clean separation between the user interface and the TWAIN class. You should be able to move that part of the code to your project. You’ll then have to learn how to make the appropriate calls to control the TWAIN driver. The sample application can provide some guidance, along with the TWAIN Specification.

    For comparison, try downloading and running the TWAIN CS project on Source Forge. This project is in C#, but the TWAIN CS Test application can give you insights into the order of the calls you need to make in your application. You can also use the TWACKER (written in C++) as a learning tool, but I recommend against copying its code for use in your application, unless they’re very small snippets…

    Good luck!

    — Mark

    July 31, 2014 at 5:56 pm #26098 Reply
    denia
    Participant
    • Topics - 1
    • Replies - 1
    • Total Posts - 2

    thank you for the help! 😀

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Getting an image from scanner using twain, c++ programming
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

  • Sports betting Bonus Code
  • 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.