Home › Forums › TWAIN Classic › Kodak sample source
- This topic has 10 replies, 2 voices, and was last updated 16 years, 10 months ago by gabe.
- AuthorPosts
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
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_32kodak
ramscan.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_32kodakconst.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.
.
thanks for the help – I am in simulation mode now too 😉
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!
what twState were you in when you called ImageFileXfer.Get ?
.
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?
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.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 GABEcould 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.
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);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.
.
- AuthorPosts