-
c7570143
by Bernd Herd at 2025-12-04T20:47:48+01:00
twaindsm: Put DSM code into twaindsm.dll and add twain_32.dll wrapper.
Renamed dlls/twain_32 to dlls/twaindsm thus creating twaindsm.dll as
platform independent name for the Twain Data Source Manager
as it is used on 64-Bit windows.
Create new dlls/twain_32 as a wrapper for 32-Bit Windows only that
forwards all calls to the main implementation in twaindsm.dll.
Send the DG_CONTROL/DAT_ENTRYPOINT/MSG_SET before DG_CONTROL/DAT_IDENTITY/MSG_OPENDS
so Twain 2.x aware data sources like sane.ds don't need to know the
filename of the Twain DSM to find the DSM entry point.
On 32-Bit Systems LoadLibrary for the twain_32.dll wrapper when
opening the DS and it is not 2.x compliant. This makes sure
it will find the DSM_Entry of twain_32.dll if it uses
GetModuleHandle("twain_32.dll") to find the DLL.
-
5695baf7
by Bernd Herd at 2025-12-04T20:50:27+01:00
twaindsm: Implement DG_CONTROL/DAT_ENTRYPOINT/MSG_GET.
Implement DG_CONTROL/DAT_ENTRYPOINT/MSG_GET as a first step towards
implementing Twain 2.0 extensions to the protocol
-
5b50d54a
by Bernd Herd at 2025-12-04T20:50:48+01:00
twaindsm: Add DG_CONTROL/DAT_CALLBACKx/MSG_REGISTER_CALLBACK to support TWAIN 2.x protocol.
Since TWAIN version 2.0, applications are encouraged to use callbacks instead of
window messages for communication. This commit implements the TRIPLET
to set the callbacks and the call to those callbacks.
If an application does not use callbacks, the old PostMessage method
is being used as before.
-
8e7f0766
by Bernd Herd at 2025-12-04T20:51:08+01:00
twaindsm: Recursively search in C:\Windows\twain_xx for installed data sources.
Data sources installed with a setup program are storing their
data in subdirectiries of C:\Windows\twain_32 or C:\Windows\twain_64.
This commit adds recursive search for all .ds files in these
directories to add them to the list of available data sources