Home › Forums › TWAIN Classic › Twain drivers working on both x86 and x64?
- This topic has 8 replies, 4 voices, and was last updated 8 years, 5 months ago by dpenney.
- AuthorPosts
Hi,
We are developping our in-house application and now need to be able to scan documents directly from it.
Our problem is thats the application is setup to run with “AnyCPU”. so depending on the machine, it couldbe run in x86 or in x64.
So far, the drivers we have don’t even seem to work with x64.
What would be our best course of action?
Thank you,
Mathieu Turcotte
As you found, there are very few 64-bit TWAIN drivers. You just need to specify “x86” instead of “AnyCPU” to force your app to run in 32-bit mode on a 64-bit OS. Maybe a .NET expert would be willing to explain if there is any downside to doing this.
–@dpenney wrote:
As you found, there are very few 64-bit TWAIN drivers. You just need to specify “x86” instead of “AnyCPU” to force your app to run in 32-bit mode on a 64-bit OS. Maybe a .NET expert would be willing to explain if there is any downside to doing this.
–The thing is I can’t do that. We need the application to run in 64 bits as we need the memory. No matter what, it will keep on running im 64 bits. If that means not implementing the scanners, so be it, but we can NOT set it to run in x86… it really has to be AnyCPU… 🙁
Any solutions? is there alternatives to TWAIN that will work in x64?
There is no way to load 32-bit TWAIN drivers in a 64-bit application. You might consider creating a separate 32-bit application to run the TWAIN drivers and have it send the images to your 64-bit application.
–@dpenney wrote:
There is no way to load 32-bit TWAIN drivers in a 64-bit application. You might consider creating a separate 32-bit application to run the TWAIN drivers and have it send the images to your 64-bit application.
–Thanks. Thats the solution we were talking about and that we’re trying to do without. But if we have no choice its probably what we are going to do…
Regarding what dpenney said:
*CONCURRENCE*
(Hi Doug!)
I know, he doesn’t need my support, I just don’t get to post a ‘me too’ post very often.But if we have no choice its probably what we are going to do.
ทางเข้าจีคลับWell, we found no other option so thats what I did. I created a sepperate project that’s always running in 32 bits, and I invoking it in a process that received my parameters by arguments. That way I only have a button in our main application that calls it and wait for it to go get the file from the local machine and upload it to our servers, and creates an entry for it in the database. The sepperate application only does the scanning portion our main application does all the rest (UI, sending parameters, managing the outputted file, etc).
Works like a charm (of course, I’m the one who did it! lol), even tho I would have prefered it to be included in the main application…
Glad to hear you got it working. As an added bonus, now your main application will not crash due to a buggy TWAIN driver.
–- AuthorPosts