I have a C# application that I would like to either use the 32-bit or 64-bit Twain SDK dll depending on what platform it is running on. The examples provided suggest that we need to create a separate application for both. Is there a better way?
For instance, can I load the platform specific twain DLL depending on whether it is 32-bit or 64-bit? I would like to create one executive for distribution. And on startup of the application, I would like to:
if (IntPtr.Size == 8)
{
// load 64-bit version of the library
}
else
{
// load 32-bit version of the library
}
Use 32-bit or 64-bit DLL depending on platform
Moderator: Alex
Re: Use 32-bit or 64-bit DLL depending on platform
Hello,
You can compile your application with version 7.0 of VintaSoftTwain.NET SDK in "Any CPU" mode
and your application will:
and your application will:
your application will:
professional scanners have native x64 TWAIN drivers.
Best regards, Alexander
You can compile your application with version 7.0 of VintaSoftTwain.NET SDK in "Any CPU" mode
and your application will:
- work in x32 systems with TWAIN_32.DLL or TWAINDSM.DLL (x32)
- work in x64 systems with TWAINDSM.DLL (x64)
and your application will:
- work in x32 systems with TWAIN_32.DLL or TWAINDSM.DLL (x32)
- work in x64 systems with TWAIN_32.DLL or TWAINDSM.DLL (x32)
your application will:
- NOT work in x32 systems
- work in x64 systems with TWAINDSM.DLL (x64)
professional scanners have native x64 TWAIN drivers.
Best regards, Alexander
Re: Use 32-bit or 64-bit DLL depending on platform
Alex,
I like the idea of compiling using the "Any CPU" configuration. Q: How do we reference in our project the right assemblies? I'm a little lost here - since Vintasoft TWAIN x86 and x64 are two seprate DLL's which would we reference for our development and how would we deploy in our setup?
thanks!
-Paul
I like the idea of compiling using the "Any CPU" configuration. Q: How do we reference in our project the right assemblies? I'm a little lost here - since Vintasoft TWAIN x86 and x64 are two seprate DLL's which would we reference for our development and how would we deploy in our setup?
thanks!
-Paul
Re: Use 32-bit or 64-bit DLL depending on platform
Hello Paul,
You can use Vintasoft.Twain.dll from x86 or x64 directories - it's the same DLL.
Best regards, Alexander
You can use Vintasoft.Twain.dll from x86 or x64 directories - it's the same DLL.
Best regards, Alexander
-
- Posts: 1
- Joined: Tue Feb 22, 2011 11:12 pm
Re: Use 32-bit or 64-bit DLL depending on platform
I have an Issue with the Any CPU build. I have added the Vintasoft Twain x86 dll, If I build the app in x86 mode then it is showing the devices list but If I try with Any CPU mode it is not showing, Is there anyother settings i need to change for this? What is the DSM dlls?
Re: Use 32-bit or 64-bit DLL depending on platform
Hello,
I think you have 64-bit system and 64-bit systems are supported only since TWAIN 2.0 - you need to install TWAIN 2.0 Data Source Manager (DSM) in the system.
Best regards, Alexander
I think you have 64-bit system and 64-bit systems are supported only since TWAIN 2.0 - you need to install TWAIN 2.0 Data Source Manager (DSM) in the system.
Best regards, Alexander