PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD19-20] Strange Twain Error
[WD19-20] Strange Twain Error
Iniciado por guest, 21,abr. 2015 23:21 - 3 respuestas
Publicado el 21,abril 2015 - 23:21
My colleague is working on some a sample project and is unable to use TwainSelectSource() or use any Twain functions. He gets this error, "Unable to open SourceManager(TWAINdsm.dll)."

The weird thing is it works just fine with the same exact code if he pulls up the WD Scanning example. We've tried creating new projects in different directories. We've tried creating a new project in the same directory as the examples. I had him delete his cpl folder and project.env file. We've restarted the printer and the computer. Nothing works, except for WD Scanning example.

I used the same printer/scanner and the same code recently without problems. Any ideas?
Publicado el 22,abril 2015 - 13:17
Hi Curtis

by any chance, is your colleague:
- using windev IDE 64 bits?
- testing in 64 bits?
- creating a 64 bits exe?

if the answer to any of these questions is yes, it's probably the cause, because 64 bits twain drivers/system are exceedingly rare

Best regards
Publicado el 06,mayo 2020 - 19:08
Does it mean that if someone needs to integrate any TWAIN function, it is impossible to compile in 64 bits?
Publicado el 06,mayo 2020 - 21:25
Yes and no

that was 5 years ago... You will find many more 64 bits drivers these days... BUT...

And this is true for ANY interaction with outside exe/dll/driver... you always need to be in the same either 32b or 64b for the whole chain of processes.

So if you are sure that all twain drivers that will be used will be available in 64 bits, you need to compile in 64 bits. if you are sure that they will all be available in 32 bits, you need to compile in 32 bits...

If you don't know you need to compile in both version and install according to your needs -OR-

You can compile ONLY the twain part as small external utilities in both 32 and 64 bits, and call one or another according to a setting or test from your always 64bits or 32 bits application.