Forum Replies Created
- AuthorPosts
@darkride wrote:
How can i detect action of pressing scan button on the device?
Twain sepcyfication allows for it?
thxYou probably have to contact the vendor of the scanner that you want to support to find out how, or if, the device supports this via TWAIN. I’m guessing most vendors don’t support it.
The only thing I see in the specification that seems to fit is CAP_DEVICEEVENT/TWDE_DEVICEREADY or possibly a vendor-specific event using TWDE_CUSTOMEVENTS.
On Windows, the STI (STill Image) interface supports a way to launch an application when the scanner button is pressed. Here’s how to see if your device supports this OS-specific feature:
1) Go into Control Panel->Scanners and Cameras.
2) Right-click on the scanner and select Properties.
3) If the Properties window has an “Events” tab, the device does support STI events. Check that one of the events is a button press.Here’s how to register your application as an STI event handler:
http://msdn.microsoft.com/library/en-us/stillimg/sti_1gyt.asp
And detect when an STI event has caused your app to be launched:
http://msdn.microsoft.com/library/en-us/stillimg/sti_7wbp.asp
Can you do a duplex scan using the fi5220c DS in any program other than your own? If not, you probably found a bug in the DS. I would suggest trying to contact Fujitsu for a solution.
If you can do a duplex scan in some other program it MAY indicate that your program will work if you switch to a memory or file transfer. Very few programs use native transfers so perhaps Fujitsu is not aware that their fi5220c DS has a bug when using native transfers for duplex scans.
One update from yesterday’s post:
Acrobat Professional 6.0.4 does properly handle multi-image transfers with my DS.
After further investigation, I think the apps that don’t work (see previous post) are assuming that all DS’s transfer only one image, as typical flatbeds do. They assume the Count returned on DAT_PENDINGXFERS/MSG_ENDXFER is zero so they automatically transition to state 5 waiting for a MSG_XFERREADY or MSG_CLOSEDSREQ while my DS is still in state 6 waiting to transfer the second image.
Any thoughts on this?
Are you saying that no DS’s respond to setting brightness or contrast or only a specific one doesn’t respond? The former points to a problem in your code while the latter indicates an undesirable feature (a.k.a. bug) in a specific DS. I suggest trying your code with other DS’s if you haven’t already.
> When my DS is active and another acquire will be started Irfan
> hangs after a second Acuire and I need to kill it in the Task Manager.
> What can I do on DS side to prevent this problem?Use a global mutex to know when your DS is already open. If you can’t acquire the mutex on DG_CONTROL/DAT_IDENTITY/MSG_OPENDS put up a message such as “Error: TWAIN Data Source is in-use.” and return TWRC_FAILURE/TWCC_OPERATIONERROR. This will prevent the user from reopening your DS but it will not prevent them from opening another vendor’s DS while yours is open.
It could be a bug in Irfan. You may want to contact the developer.
I’m a DS developer looking for the 64-bit DSM for XP x64 Edition that is mentioned in the TWAIN 2.0 Proposal.
What is the status on the Windows 64-bit DSM? Is the TWG planning to release it? If so, when?
It seems not much has happened in the year and a half since the proposal came out.
- AuthorPosts