Home › Forums › TWAIN Classic › Couple issues
- This topic has 7 replies, 2 voices, and was last updated 15 years, 1 month ago by cgwahl.
- AuthorPosts
Have an issue where I’m scanning multiple pages:
rc = DS_ImageTransfer(AppID, SrcDS, TwDG.DG_IMAGE, TwDAT.DAT_IMAGENATIVEXFER, TwMSG.MSG_GET, hbitmap)
And it duplicates the hbitmap pointers.
An example would be this:
Page 1: 57147836 ***
Page 2: 57147804
Page 3: 57147796
Page 4: 57147788
Page 5: 57147780
Page 6: 57147836 ***
Page 7: 57147740
Page 8: 57147748
Page 9: 57147764I made it where when it turns the DIB to a JPEG it won’t do it twice, which means the missing page needs to be scanned again. But any ideas why this is even happening? I’ve tried it on two computers with similar results.
The other issue, which I am fairly sure is related since when the below happens I can be sure the pointer got duplicated is when I do this after the scan:
rc = DS_PendingTransfer(AppID, SrcDS, TwDG.DG_CONTROL, TwDAT.DAT_PENDINGXFERS, TwMSG.MSG_ENDXFER, PendingTransfers)
It happens at the very end when there is no paper and while it doesn’t happen everytime (can go like a dozen scans with no problem then all of a sudden it happens again), a box pops up asking me to “Please enter a positive integer” with a message box title of “fjtw32.ds.” You have to hit OK 3 or 4 times before it finally proceeds. The Return Code is a Success. As is the Condition Code.
After hitting ok a few times above, I get the pop up when I do this at the end here:
rc = DS_PendingTransfer(AppID, SrcDS, TwDG.DG_CONTROL, TwDAT.DAT_PENDINGXFERS, TwMSG.MSG_RESET, PendingTransfers)
And then finally here:
rc = DS_UserInterface(AppID, SrcDS, TwDG.DG_CONTROL, TwDAT.DAT_USERINTERFACE, TwMSG.MSG_DISABLEDS, guif)
Any ideas? I am using a Fujitsu fi-4120C2. And as said before, I tried this on two computers, however I haven’t tried different drivers.
Just the one from Fujitsu’s website. This is just my test scanner at the moment, I should be getting a couple newer ones for something else so I suppose I can see if it’s the scanner itself that’s the problem. I was accidentally using the WIA driver and getting the same issue of duplicate pointers (without the popup for positive numbers though).
try to duplicate the behavior with a kodak scanner in simulation mode. if you can duplicate the behavior in the simulator I’d guess you have a bug, otherwise I’d say the driver is fishy.’
.
Ok, downloaded/installed the driver. Works as a single scan. Is there a setting somewhere to simulate scanning multiple pages?
And is it normal for it to fail on this?
rc = DS_PendingTransfer(AppID, SrcDS, TwDG.DG_CONTROL, TwDAT.DAT_PENDINGXFERS, TwMSG.MSG_RESET, PendingTransfers)
Thanks.
to turn on simulation mode you had to go edit a file, usually read another one to see what devices the driver could simulate. i don’t remember the names of the files but the process if fairly straight forward, go read the rest of those files and they explain how to get it to duplex and how to additionally tell it the dimensions for the images to simulate. post back if you have trouble and i’ll dig out some better instructions
and no I don’t remember their (non .net) drivers having any issue other than the returning rc=error with condition code success in some cases.
.
Ah ok, figured out was the issue was. The i600 driver doesn’t have a ramscan.txt file that I can see, but the i100 and i200 do to simulate multiple scans. Nice.
Having issue with it not passing a ready message to start scanning, but I’ll get that worked out tomorrow.
Thanks for the simulator suggestion.
Well for anyone that cares I think I figured the problem out. Looks like it was happening because I was setting the CAP_XFERCOUNT before I was doing the other capability stuff (Paper Size, DPI, etc.).
After moving them to before the CAP_XFERCOUNT of -1 it seems to work fine. Although the -1 itself doesn’t seem to be an issue since I was also getting it when I set it to 1, 2 and 5.
Weird, cause unless I missed it in the specification I don’t see where it says it has to be the last capability set.
we care, just slowly .. and not every day..
the only doc that describes the order to set caps in is the ‘Capability Ordering’ whitepaper and I don’t remember that being an issue there. http://twain.org/docs/CapOrderForWeb.PDF
I don’t think I’ve run into that issue with espon, hp or kodak devices.Did you reproduce the issue in the simulator or only with your hardware?
.
@gabe wrote:
we care, just slowly .. and not every day..
Haha, I’m gonna start using that.
Did you reproduce the issue in the simulator or only with your hardware?
.
The simulator seemed to work fine. Had it scan as many as 200 and 300 images at a time at one point with no problems (popups, etc.).
Don’t know when I can do it, but I eventually want to steal a coworkers scanner (HP scanner) to see if it’s an issue with that as well. Since when they gave me more scanners to test with, they were the same make and model (Fujitsu fi-4120C2) as the scanner they gave previously.
But beyond that. It’s working and I’m happy.
- AuthorPosts