July 11, 2016 at 5:28 pm #23071
I am kind of running out of ideas on what causes the issue.
We have a custom application which works fine with TWAINDSM 32 bit. Our application installer uses the .MSM files to place the correct files on the system.
Our application works fine with most of the Fujitsu 6130s. There is this one customer that we can’t get it to work. After more investigation, it seems they are using a domain made PC image. They gave us a system, brand new OS. Our app works fine. It fails on the other ones that are on the domain.
It fails to LoadLibrary with Fujitsu .ds
Crazy thing is that Twacker.exe works fine.
I found the TWAINDSM.dll and modiffied to log the error could that comes out the LoadLibrary method internal to TWAINDSM. It is error 1114 which is ERROR_DLL_INIT_FAILED.
Why is TWAINDSM failing under my app, but not Twacker.
Here is a short log:
[101957890 dsm.cpp 399 0 00000FE4] TWAIN Working Group
[101957890 dsm.cpp 400 0 00000FE4] TWAIN 32 Source Manager (Image Acquisition Interface)
[101957890 dsm.cpp 401 0 00000FE4] version: 2, 3, 0, 0
[101957890 dsm.cpp 2368 0 00000FE4] Sorna TWAIN -> DSM
[101957890 dsm.cpp 2377 0 00000FE4] DG_CONTROL/DAT_PARENT/MSG_OPENDSM
[101957890 apps.cpp 357 0 00000FE4] Application: “XXXXX”
[101957890 apps.cpp 358 0 00000FE4] “XXXX”
[101957890 apps.cpp 359 0 00000FE4] “XXXXX
[101957890 apps.cpp 360 0 00000FE4] TWAIN 2.3
[101957890 apps.cpp 1438 127 00000FE4] We’re deliberately skipping this file: C:Windowstwain_32wiatwain.ds
[101957890 apps.cpp 654 127 00000FE4] Condition Code: DS or DSM reported error, application shouldn’t display an error
[101957906 apps.cpp 1404 1114 00000FE4] Could not load library: C:Windowstwain_32fjscan32Fjtw0400.ds
[101957906 apps.cpp 654 1114 00000FE4] Condition Code: DS or DSM reported error, application shouldn’t display an error
[101957906 dsm.cpp 2432 18 00000FE4] TWRC_SUCCESSJuly 12, 2016 at 4:26 pm #26422
Ok. More investigation:
It turns out TWAIN C# app also fails to grab the device. Same error is “Could not Load Library”
Twacker works just fine. I am guessing (based on Twacker source code) things are statically loaded. With the .NET apps and the environment, some things might be missing and causing it. Not sure what though. Dependency Walker is not shedding any light on this matter.
I will post more info if I find any solution. In the meantime, I appreciate if someone can shed some light on this matter based on prior experience. Thanks!