This project has moved. For the latest updates, please go here.

"Cann't load library Twain_32.dll" when using Saraff.twain.dll from another assembly dll

Aug 20, 2013 at 2:01 PM
Edited Aug 20, 2013 at 2:01 PM
Hello,

First, thanks and congratulation for your dll ! Wia is easy to use, but twain is harder than WIA :)

I tested your Saraff.twain.dll in a simple winform, all is ok, perfect :)

I would like to use your Saraff.twain.dll in an other assembly DLL.

My code compile fine, but on the first line :
Twain32 _twain32 = new Twain32();
I have an exception with the error : "Cann't load library Twain_32.dll".

My dll is developped in C#, in VS2012 with the Framework .net 4.0

Have you an idea please ?

Thanks a lot,

Best regards,

Nixeus
Coordinator
Aug 20, 2013 at 7:09 PM
Hello, Nixeus.
Thanks for your opinion.
What's your have OS, x64? If yes, then you need build your assembly (executable file) for target platform x86. This is due to the fact that twain_32.dll is 32-bit file, and it can not be loaded into a 64-bit process. Moreover, the scanner driver is also generally 32-bit. In general, the situation is the same as with the internet-browsers.
Marked as answer by SARAFF on 6/23/2014 at 12:46 PM
Aug 22, 2013 at 1:29 PM
Hello Saraff,


It's ok for this problem, setting x86 for the target plaform solve this problem.
I have another problem, i will create an other thread.

Thanks a lot :)

Nixeus