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

SET_AUTOSCAN to true in java.

Forums › TWAIN Classic › SET_AUTOSCAN to true in java.

  • This topic has 1 reply, 2 voices, and was last updated 8 years, 1 month ago by spike.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • December 10, 2012 at 6:28 pm #22801 Reply
    hellubuntu
    Participant
    • Topics - 1
    • Replies - 0
    • Total Posts - 1

    Personal Greetings.

    Could someone help me?

    I’m developing a java code to scan the images, I’m using windows dll free twain_32.dll for that.

    however I am not able to enable CAP_AUTOSCAN true?

    where I put the CAP_AUTOSCAN to true?

    my code follows:

    private static int setAutoScan (TW_IDENTITY application,
    TW_IDENTITY src, int hwnd) {

    TW_CAPABILITY TW_CAPABILITY = new CAP ();

    CAP.Cap = JTwain.CAP_AUTOSCAN;

    CAP.ConType = TWON_ONEVALUE;

    CAP.hContainer = hwnd;

    int stat = twain.DSM_Entry (application, src,
    DG_CONTROL,
    DAT_CAPABILITY,
    MSG_SET,
    CAP);

    December 18, 2012 at 9:40 pm #25750 Reply
    spike
    Participant
    • Topics - 10
    • Replies - 139
    • Total Posts - 149

    OK… I wrote that DLL, and I don’t understand what you’re doing 😉

    Do you have other code that is working, and you are just adding this? What happens?

    How do you know CAP_AUTOSCAN is FALSE?
    (It’s almost always TRUE by default.)
    What scanner are you working with?

    You really need to read the TWAIN spec if you’re going to work at this level.
    https://www.twain.org/scannerdriverdevelopers/specification-and-tools.html
    The CAP.hContainer isn’t a Window handle, it’s a GlobalHandle to a structure described in the TWAIN specification – see the TW_ONEVALUE structure. There’s some example code on page 4-13 of the Version 2.2 specification, that shows a TW_ONEVALUE being created and used to set a capability.

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: SET_AUTOSCAN to true in java.
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.