Forum Replies Created
- AuthorPosts
Hi Spike,
I realized that when I send MSG_OPENDS to TWAIN driver,the driver will throw a pop-up(message:twain is in use). But I am using windows service
so i couldn’t see the popup and application hangs. I don’t want to enable the “desktop interaction” property on windows service.Is there another way to overcome this problem ?
Thank You
@spike wrote:
1- The first application (other application-does not matter) opens the twain data source and shows the driver graphical user interface
2- At this time, a scan request is sent from network to our application(second application). We are using the TwainDSM. There is no problem until we sent MSG_OPENDS message,
But when we sent MSG_OPENDS message, our application thread hangs and wait forever.
My question is :
– How to solve this hanging problem ?
– Is it possible to understand that the twain driver is currently used by an another application and is not suitable for sending the MSG_OPENDS message ?There is no TWAIN mechanism for asking if a driver or device is busy, the TWAIN device driver is responsible for detecting this situation and responding appropriately.
1. Check that your application is correctly checking the return code from the MSG_OPENDS, so if the driver is failing the 2nd open, your code would handle that correctly. I would expect a properly coded driver to return TWRC_FAILURE, and then report a Condition Code of TWCC_MAXCONNECTIONS (“The data source cannot support any more connections to this device”).
2. If your application is correctly coded and the driver is hanging inside the MSG_OPENDS call, then this is a driver problem, and you should discuss this with the scanner vendor.
- AuthorPosts