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

Kodak sample source

Forums › TWAIN Classic › Kodak sample source

  • This topic has 10 replies, 2 voices, and was last updated 13 years, 6 months ago by gabe.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • July 11, 2007 at 8:34 am #22169 Reply
    TheCrow99
    Participant
    • Topics - 6
    • Replies - 54
    • Total Posts - 60

    I read in one of the posts (I think it was one from gabe) that Kodak offers drivers which can be run in simulation mode without actually having a Kodak device.
    I looked at the Kodak Homepage and downloaded a Scan Validation Tool and I can run this one in simulation mode but only from the UI of the tool. Does anybody know what I have to do to use this tool in simulation mode from a TWAIN application?
    I can select this Kodak driver as source but of course I can’t open it because the device doesn’t exist.

    THANKS

    July 11, 2007 at 2:25 pm #23886 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    yup, the kodak drivers work without a device present. in my world it is an invaluable feature a feature that I’d like to see more vendors adopt.

    %windir%twain_32kodakramscan.txt (or a shortcut to it) will contain the availble models that a particular driver can simulate – it will be ,for the i series, an i with a number – i30, i40.
    the %windir%twain_32kodak
    const.ini is where you’ll enter that number. by default you’ll have a Simulate=0 change it to Simulate= for example Simulate=i30

    poof, you’re in simulation mode. if you have questions just ask. on my development machines I’ll typically install the i30/i40, i100 and i600 drivers and so far I’ve been very happy with the results.

    .

    July 12, 2007 at 6:28 am #23887 Reply
    TheCrow99
    Participant
    • Topics - 6
    • Replies - 54
    • Total Posts - 60

    thanks for the help – I am in simulation mode now too 😉

    July 12, 2007 at 6:51 am #23888 Reply
    TheCrow99
    Participant
    • Topics - 6
    • Replies - 54
    • Total Posts - 60

    ok maybe I was a bit too enthusiastic. I can run the Kodak i100 and i30/40 Scanner in simulation mode now, but when I try out my scan program (which works for the TWAIN Sample source and a HP Scanjet5400c via WIA) it reports RC=1, CC=11 on the command
    sm = (*pDSM_Entry) (&app_id, &ds_id, DG_IMAGE, DAT_IMAGEFILEXFER, MSG_GET, NULL);
    and there also a window comes up which tells me the scanner is not activated. Does anybody know how to activate a scanner?

    THANKS FOR YOUR HELP!

    July 12, 2007 at 7:26 am #23889 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    what twState were you in when you called ImageFileXfer.Get ?

    .

    July 12, 2007 at 8:41 am #23890 Reply
    TheCrow99
    Participant
    • Topics - 6
    • Replies - 54
    • Total Posts - 60

    I thought I was in state 6 but according to the RC CC messages I am not, is there a possibility to query the state I am in?

    July 12, 2007 at 9:12 am #23891 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    no… yes., maybe,. sometimes…

    There aren’t any direct twain calls to query your twstate, but some libraries track it for you.
    If you’re using someone else’s library or wrapper check their docs/support to see if they provide twstate tracking for you.
    If you’re calling twain_32.dll directly you just have check the rc/cc for each of your calls and track the state yourself.

    July 12, 2007 at 9:36 am #23892 Reply
    TheCrow99
    Participant
    • Topics - 6
    • Replies - 54
    • Total Posts - 60

    no I am calling Twain_32.dll myself. the only thing I don’t understand is, why it works with some sources and with some it doesn’t, but I guess I will try to organize some more scanners and test it on them
    THANKS FOR YOUR HELP GABE

    July 12, 2007 at 10:00 am #23893 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    could be that some sources aren’t following the protocol (wouldn’t surprise me) if you model your app after twacker you should be alright. also try to do with you’re doing in the app with twacker, so if you get the same message/error.

    for the most part the kodak drivers behave.

    July 12, 2007 at 10:31 am #23894 Reply
    TheCrow99
    Participant
    • Topics - 6
    • Replies - 54
    • Total Posts - 60

    could be that the device just doesn’t care about the standard, but as it is not working with the kodak either I guess there must be a problem with my code.
    one last questen: what does RC=1 and CC=0 mean? this doesn’t look logical to me but I get it when I do sm = (*pDSM_Entry) (&app_id, &ds_id, DG_CONTROL, DAT_SETUPFILEXFER, MSG_SET, &set_id);

    July 12, 2007 at 11:38 am #23895 Reply
    gabe
    Participant
    • Topics - 9
    • Replies - 583
    • Total Posts - 592

    ah yeah, TWRC_FAILURE followed by TWCC_SUCCESS. it’s an odd one. I’ve only seen it with Kodak devices and I count those as TWRC_SUCCESS.
    When I find bits of my code that produce rcFailure with ccSuccess I recheck my code to be sure that I havent perhaps called a triplet twice or another triplet (so that I’m not misunderstanding which triplet the cc apllies to) but so far pretending that I recieved an rcSuccess hasn’t failed me and things work otherwise as expected.

    If you have more questions just ask, maybe start new threads for new questions, but don’t hesitate to ask.

    .

  • Author
    Posts
Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: Kodak sample source
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

  • Hello world
  • 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
  • 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.