XnView MP 64bit with TWAIN 32bit support

Reported bugs that have been closed and/or resolved

Moderators: XnTriq, helmut, xnview, Dreamer

Tim
Posts: 11
Joined: Sun Dec 31, 2006 1:02 pm

XnView MP 64bit with TWAIN 32bit support

Post by Tim »

<Moderator's note: Originally this was a bug report but it turned out to be a suggestion.>
___

Subject: 0.82 Win: No scan source available

Hi,

in Xnview MP 0.82 there is no scan source available, i have a Canon 9000F M2, in xnview classic the scanner works fine (there are two scan-sorces, Canon 9000 and WIA-Canon 9000), in XnView MP there is nothing to choose from ...

Thank you
cday
XnThusiast
Posts: 3985
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Windows: No scan source available

Post by cday »

Tim wrote:In XnView MP 0.82 there is no scan source available, I have a Canon 9000F M2, in XnView Classic the scanner works fine (there are two scan-sources, Canon 9000 and WIA-Canon 9000), in XnView MP there is nothing to choose from ...
In XnView MP x64 scanning using the TWAIN interface normally isn't available due to a lack of support in Windows (which can be overcome using a third-party utility) and also lack of support by most scanner manufacturers. Note that scanner manufacturers' x64 bit software normally actually interfaces using the Windows x32 bit TWAIN interface. That's about right, isn't it XnTriq?

I'm not sure why you are unable to scan using the Windows WIA interface, I would have thought that should be possible...

You should, however, be able to scan from XnView MP using TWAIN by installing in XnView MP x32, and there is no reason why both versions can't be installed at the same time, so that should provide a reasonable work-around. The scanner manufacturer's x64 bit software should still be installed. To view PDF files in XnView MP x32 you will, however, need to install Ghostscript x32 which can be similarly be installed in parallel with Ghostcript x64.
User avatar
XnTriq
Moderator & Librarian
Posts: 6339
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Windows: No scan source available

Post by XnTriq »

Tim wrote:in Xnview MP 0.82 there is no scan source available, i have a Canon 9000F M2, in xnview classic the scanner works fine (there are two scan-sorces, Canon 9000 and WIA-Canon 9000), in xnview MP there is nothing to choose from ...
Could you please try to run XnView MP as administrator?
cday wrote:In XnView MP x64 scanning using the TWAIN interface normally isn't available due to a lack of support in Windows (which can be overcome using a third-party utility) and also lack of support by most scanner manufacturers. Note that scanner manufacturers' x64 bit software normally actually interfaces using the Windows x32 bit TWAIN interface. That's about right, isn't it XnTriq?
It's my understanding that version 2 of the TWAIN Data Source Manager comes with a fully native 64-bit implementation.
Atalasoft Knowledge Base (FAQ: [url=http://www.atalasoft.com/KB/article.aspx?id=10346]Common Problems with x64 TWAIN Scanning[/url]) wrote:The reason your scanner is missing when you compile as a x64 bit application is that your scanner doesn't have a 64-bit TWAIN driver. Yes, it supports your 64-bit operating system, but it is still only a 32-bit driver and 32-bit implementation of TWAIN. In order to show up to TWAIN in a 64-bit application it needs to implement the full 64-bit TWAIN interface. This limitation is not unique to us, all products that use TWAIN have this same exact limitation.
cday ([url=http://newsgroup.xnview.com/viewtopic.php?p=119182#p119182]0.65 - W8/x64: TWAIN Source / TWAIN scan[/url]) wrote:Googling 'Windows 64 TWAIN' there is clearly a widespread problem using scanners over a TWAIN interface in 64-bit versions of Windows.

The following text from this link may possibly shed some light on the issue:

http://altoimaging.typepad.com/alto-ima ... -meet.html
To our knowledge (based on examining a fairly large number of popular scanners), there are no 64-Bit TWAIN drivers available. They are all running in 32-Bit compatibility mode on 64-Bit PCs. This means that the 32-Bit versions of the apps can use the 32-Bit TWAIN drivers and access a scanner as it would in the 32-Bit OS. But, the 64-Bit versions of the apps cannot access the 32-Bit drivers.

Some scanner suppliers are apparently advertising drivers as 32/64-Bit compatible. This could mean that they are packaging both versions in the driver install file. But, please be aware that in most cases we have seen, it only means that the drivers will work in both 32-Bit and 64-Bit versions of Windows. As discussed above, you can use the 32-Bit drivers in 64-Bit Windows, but only with 32-Bit applications.
I'm not sure whether the following freeware software might be of any help in overcoming this issue:

http://sourceforge.net/projects/twain-dsm/files/

I read a while back something about scanner manufacturers and Microsoft agreeing not to support TWAIN 64 for some reason, but the present situation seems bizare...
cday
XnThusiast
Posts: 3985
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Windows: No scan source available

Post by cday »

XnTriq wrote:
cday wrote:In XnView MP x64 scanning using the TWAIN interface normally isn't available due to a lack of support in Windows (which can be overcome using a third-party utility) and also lack of support by most scanner manufacturers. Note that scanner manufacturers' x64 bit software normally actually interfaces using the Windows x32 bit TWAIN interface. That's about right, isn't it XnTriq?
It's my understanding that version 2 of the TWAIN Data Source Manager comes with a fully native 64-bit implementation.
It is important to distinguish between a TWAIN Data Source Manager .dsm and a TWAIN Data Source .ds .

A TWAIN Data Source Manager .dsm provides a means to select one or other TWAIN interface when more than one is available, as when more than one scanner (or other TWAIN device) is installed on the computer. A TWAIN Data Source .ds is the software interface to a particular TWAIN device that is normally provided by the scanner or other device manufacturer.

The reason that TWAIN scanning is normally not available from Windows x64 bit software such as XnView MP is that scanner manufacturers for one reason or another normally don't provide the required 64-bit Data Source .ds . It has been suggested that this is due to the complexity of the feature-rich TWAIN interface and the fact that existing 32-bit Data Sources can be reused on 64-bit Windows in the manufacturer's own software with a suitable software interface to TWAIN 32-bit.

The simple way to scan using TWAIN on 64-bit Windows is to install XnView MP 32-bit, which if desired can be installed alongside XnView MP 64-bit, or alternatively to use XnView Classic for scanning.

That's my current understanding...
User avatar
XnTriq
Moderator & Librarian
Posts: 6339
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Windows: No scan source available

Post by XnTriq »

cday wrote:It is important to distinguish between a TWAIN Data Source Manager .dsm and a TWAIN Data Source .ds.
I was referring to your comment “that scanner manufacturers' x64 bit software normally actually interfaces using the Windows x32 bit TWAIN interface.”
Data Source and Data Source Manager and Application all have to be 64-bit.
  • Image
jimwatters (TWAIN Forum » [url=http://www.twainforum.org/viewtopic.php?p=7969#p7969]64-bit TWAIN only sees 64-bit TWAIN drivers?[/url]) wrote:64bit TWAIN Applications only work with the 64bit DSM and the 64bit DSM only sees 64bit Data Sources.
VintaSoft (Twain .NET SDK » [url=http://www.vintasoft.com/docs/vstwain-dotnet/Programming-Twain-Device_Manager.html]TWAIN device manager[/url]) wrote:
  1. TWAIN_32.DLL - 32-bit TWAIN device manager compatible with TWAIN 1.x specification.
    This device manager allows to work only with 32-bit TWAIN 1.x and WIA drivers.
    Normally TWAIN_32.DLL is located in "C:\Windows\" directory and included in distributive package of all versions of Windows.
  2. TWAINDSM.DLL and TWAINDSM32.MSM - 32-bit TWAIN device manager compatible with TWAIN 2.x specification.
    This device manager allows to work only with 32-bit TWAIN 1.x and 2.x drivers.
    Files of this device manager are NOT included in distributive package of Windows. On 32-bit systems the TWAIN device manager files must be placed in "C:\Windows\System32\" directory. On 64-bit systems the TWAIN device manager files must be placed in "C:\Windows\SysWow64\" directory.
    Latest version of this device manager can be found here:
    http://www.twain.org or http://sourceforge.net/projects/twain-dsm/files/.
  3. TWAINDSM.DLL and TWAINDSM64.MSM - 64-bit TWAIN device manager compatible with TWAIN 2.x specification.
    This device manager allows to work only with 64-bit TWAIN 2.x drivers.
    Files of this device manager are NOT included in distributive package of Windows. On 64-bit systems the TWAIN device manager files must be placed in "C:\Windows\System32\" directory.
    Latest version of this device manager can be found here: http://www.twain.org or http://sourceforge.net/projects/twain-dsm/files/.
Unfortunately, there is no TWAIN device manager that can work with 32-bit and 64-bit drivers at the same time and you must choose between 32-bit and 64-bit drivers. We recommend to use 32-bit drivers because most of scanners does not have 64-bit drivers.
cday
XnThusiast
Posts: 3985
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Windows: No scan source available

Post by cday »

Isn't the bottom line that scanner manufacturers rarely provide a 64-bit Data Source .ds , so it isn't normally possible to scan from 64-bit software such as XnView MP 64-bit using a TWAIN interface... The practical solution on 64-bit Windows is to use a 32-bit software application such as XnView MP 32-bit or XnView Classic for scanning.

Regarding manufacturers' own 64-bit software which provides scanning on 64-bit Windows, yes, I may have made an incorrect inference that it utilises the Windows 32-bit TWAIN interface, as the interface is really provided to enable scanner access from other software applications.
User avatar
XnTriq
Moderator & Librarian
Posts: 6339
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Windows: No scan source available

Post by XnTriq »

cday wrote:Isn't the bottom line that scanner manufacturers rarely provide a 64-bit Data Source .ds , so it isn't normally possible to scan from 64-bit software such as XnView MP 64-bit using a TWAIN interface... The practical solution on 64-bit Windows is to use a 32-bit software application such as XnView MP 32-bit or XnView Classic for scanning.
Yes, I absolutely agree on all of these points :-)
Marsu42
Posts: 96
Joined: Tue Sep 30, 2014 6:55 am

Re: Windows: No scan source available

Post by Marsu42 »

cday wrote:Isn't the bottom line that scanner manufacturers rarely provide a 64-bit Data Source .ds , so it isn't normally possible to scan from 64-bit software such as XnView MP 64-bit using a TWAIN interface... The practical solution on 64-bit Windows is to use a 32-bit software application such as XnView MP 32-bit or XnView Classic for scanning.
Well, in fairness we have to say that scanning with a 32bit twain probably isn't really inferior to 64bit twain :-p ... unless you're using a x64-only windows w/o 32bit subsystem, which might become a reality sooner or later and makes us all buy new scanners.

For 64bit apps, one possible solution could be to write a 32bit exe stub that just runs the twain interface, and then returns the location of the scanned image to the 64bit host app?
User avatar
xnview
Author of XnView
Posts: 43598
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Windows: No scan source available

Post by xnview »

Marsu42 wrote: For 64bit apps, one possible solution could be to write a 32bit exe stub that just runs the twain interface, and then returns the location of the scanned image to the 64bit host app?
yes i need to write a 32bits stub
Pierre.
User avatar
XnTriq
Moderator & Librarian
Posts: 6339
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Windows: No scan source available

Post by XnTriq »

xnview wrote:yes i need to write a 32bits stub
So that stub would act as a “bridge” like EZTwain Classic (public domain)?
User avatar
xnview
Author of XnView
Posts: 43598
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Windows: No scan source available

Post by xnview »

XnTriq wrote:
xnview wrote:yes i need to write a 32bits stub
So that stub would act as a “bridge” like EZTwain Classic (public domain)?
will be in next version
Pierre.
User avatar
xnview
Author of XnView
Posts: 43598
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: XnView MP 64bit with TWAIN 32bit support

Post by xnview »

This problem is supposed to be fixed in XnView MP 0.85 beta 1. Please check and confirm the bug fix here.
Pierre.
cday
XnThusiast
Posts: 3985
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: XnView MP 64bit with TWAIN 32bit support

Post by cday »

Not working yet:

In Browser | File > Select TWAIN source...

Expected result: Available TWAIN source(s) displayed

Actual result: Nothing... :(

Windows 7 64-bit on two computers with scanners installed.
User avatar
xnview
Author of XnView
Posts: 43598
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: XnView MP 64bit with TWAIN 32bit support

Post by xnview »

cday wrote:Not working yet:
There is an error in the package, please move twain32.exe in Addon folder
Pierre.
cday
XnThusiast
Posts: 3985
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: XnView MP 64bit with TWAIN 32bit support

Post by cday »

xnview wrote:There is an error in the package, please move twain32.exe in Addon folder
Fixed by moving twain.exe to the AddOn folder. :D
Post Reply