Forums › TWAIN Classic › Acquire while another TWAIN session ist still active › Reply To: Acquire while another TWAIN session ist still active
- Topics - 3
- Replies - 66
- Total Posts - 69
> 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.