dynarithmic / twain_library

Dynarithmic TWAIN Library, Version 5.x
Apache License 2.0
60 stars 25 forks source link

How to automatically close the Source UI after the scan is complete? #101

Closed dongshaoyang closed 3 weeks ago

dongshaoyang commented 1 month ago

When I use the DTWAIN_AcquireFile function for acquisition with bShowUI set to true, the Source UI needs to be closed manually after the acquisition is complete. How can I make it close automatically? I didn't use the DTWAIN_SetTwainMode function to set of modal / modeless dialogs.

dynarithmic commented 1 month ago

You can try DTWAIN_SetMaxAcquisitions, and set the maximum number of acquisitions to 1. This should be called before DTWAIN_AcquireFile.

dynarithmic commented 3 weeks ago

The suggestion of using DTWAIN_SetMaxAcquisitions should solve the issue. Since this issue has been opened for a month, this will be closed.