DSM Not found

Discussions about TWAIN & WIA scanning in GdPicture.NET using GdPictureImaging.
Post Reply
wnstillman
Posts: 8
Joined: Fri Dec 11, 2009 8:28 pm

DSM Not found

Post by wnstillman » Sat Oct 08, 2011 12:00 am

I know this has been discussed multiple times but I am having an issue that I can not seem to resolve.
We are running 8.2.
I have coded the TWAINSETDSMPATH
oGdPictureImaging.TwainSetDSMPath("C:\RSSSCAN\bin\twain_32.dll") Also Tried c:\windows\Twain_32.DLL and in the Users\windows directory.

Made sure users have access rights....
This worked with 8.0 we upgraded the development environment to 8.2 recompiled and tried to run in a production 64 bit machine and received :

Code: Select all

#GdTwain Log Start. Version: 650

RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 1
-------------------
Start: OpenSourceManager.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 1
-------------------
DSM library can not be loaded.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 1
-------------------
End: OpenSourceManager.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 1
-------------------
GDTWAIN_Mgr: Null DSM Entry.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 1
-------------------
Start: UnloadSourceManager.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 1
-------------------
End: UnloadSourceManager.
RC:   TWRC_SUCCESS
CC:   TWCC_SUCCESS
State: 1
-------------------
#GdTwain Log Stop.
We have compiled as ANYCPU.

The dll is TWAIN_32.DLL and is in the correct place.
Please can you point me in the right direction?

10-8-2011 15:19 I have tested the same program (compiled as ANYCPU). The program works on all 32 bit machines but fails on all 64 bit machines. Please help as we are trying to implement a new version of the program on Monday morning.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: DSM Not found

Post by Loïc » Mon Oct 10, 2011 3:11 pm

Hi,

the DSM you open is a 32-bit dll. Therefore it will be not possible to load it from a 64-bit process. Keep in mind that an AnyCPU app running on a 64-bit OS will run in 64-bit mode.

Here 2 suggestions:

- 1: let the lib loading the latest DSM available on the OS. To do that, just remove the oGdPictureImaging.TwainSetDSMPath call. By this way, GdPicture.NET will try to find a 64-bit DSM in a 64 bit OS and a 32-bit DSM on a 32-bit OS.
or
- 2: Compile your application in x86 mode.

Kind regards,

Loïc

wnstillman
Posts: 8
Joined: Fri Dec 11, 2009 8:28 pm

Re: DSM Not found

Post by wnstillman » Sat Oct 15, 2011 2:59 am

Thank you.
We did compile as x86 and tried both specifing the DSM path as well as letting it default with the same results


However when we loaded both the 32bit AND the 64 bit versions of the Microsoft Visual C++ Redistributable the program started working as expected thank you for your help.

Wes

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests