summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-06-21 10:12:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-07-07 11:55:20 +0000
commit3cecadbddd137770552ceaad018336e195233e4a (patch)
tree8189e3b2070af06447e96d9a174a486ae1d5e630
parent1190e7385291fb0e6cd3505e88e589c80b02db00 (diff)
Related: tdf#92478 speculative win64 scanning fix
TWAIN-2.3-Spec.pdf says... All TWAIN 2.x Sources must be prepared to work with either TWAINDSM.DLL or TWAIN_32.DLL, which may still be used by older Applications. The TWAIN DSM is a shared library named TWAINDSM.DLL. There is a 32-bit and a 64-bit version of this file. Change-Id: I047d872271573a5b2efc3ee2af4ecfc4e142a2b2 Reviewed-on: https://gerrit.libreoffice.org/26541 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--extensions/source/scanner/scanwin.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx
index fb4fc1592579..7075f7632e3d 100644
--- a/extensions/source/scanner/scanwin.cxx
+++ b/extensions/source/scanner/scanwin.cxx
@@ -59,10 +59,12 @@ using namespace ::com::sun::star;
#define PTWAINMSG MSG*
#define FIXTODOUBLE( nFix ) ((double)nFix.Whole+(double)nFix.Frac/65536.)
#define FIXTOLONG( nFix ) ((long)floor(FIXTODOUBLE(nFix)+0.5))
-
-#if defined(_WIN32)
-#define TWAIN_LIBNAME "TWAIN_32.DLL"
#define TWAIN_FUNCNAME "DSM_Entry"
+
+#if defined(TWH_64BIT)
+# define TWAIN_LIBNAME "TWAINDSM.DLL"
+#else
+# define TWAIN_LIBNAME "TWAIN_32.DLL"
#endif
enum TwainState