Open dynarithmic opened 4 years ago
DTWAIN version 5.1.0.6 has been released to address the issue of the Samsung driver.
I will keep this issue opened, even though DTWAIN has a workaround. This is for any other programmer's having an issue with this driver.
I have discovered that there are issues with the SAMSUNG Galaxy G5 Twain Driver.
The driver has at least two noticeable bugs that I have verified using DTWAIN.
Issue 1: When closing the TWAIN user interface for the Galaxy S5 by selecting "Cancel", the TWAIN driver does not send a MSG_CLOSEDSREQ to the application, as per the Twain Specification (currently version 2.4). This causes DTWAIN to hang, waiting for the request to be sent (but is not sent). This return must be sent by the driver to initiate proper shutdown of the device's user interface.
Issue 2: The second issue is related to Issue 1 above, and that is when "Cancel" is selected from the user interface, the driver must send back one of three return values, either TWRC_SUCCESS or TWRC_FAILURE, or TWRC_CHECKSTATUS. This again, is according to the TWAIN specification. Instead, the driver sends back a TWRC_CANCEL, which is incorrect and goes against the specification as far as I am interpreting things.
As a comparison, I used the HP CLJM277 scanner driver, and it properly shuts down the user interface, informing the application (that would be DTWAIN) of the request.
I am working on a few workarounds for the Samsung issue -- this is not a DTWAIN issue, but an issue with the compliance of the Samsung phone TWAIN driver.
For those using the Twacker program from the Twain Working Group, and discovers that the Samsung driver "works", note that the Twacker program is shutting down the entire Twain Data Source Manager each time a scan is occurring, thus effectively resetting the broken Twain session created by the Samsung driver. This is totally unacceptable for DTWAIN, since it should never be necessary to shut down the entire TWAIN ecosystem and restart it again.