TwainGetSourceCount() always return count 0

Discussions about TWAIN & WIA scanning in GdPicture.NET using GdPictureImaging.
Post Reply
gduser
Posts: 1
Joined: Wed May 16, 2012 10:19 pm

TwainGetSourceCount() always return count 0

Post by gduser » Wed May 16, 2012 10:45 pm

Hi,

We are "using GDPicture Pro Imaging SDK" version 5 in one of our application. We found that this doesn't work on Windows 7 64 Bit machine and to make it run, we had to change the Target CPU to "x64".

Now, we want to upgrade our tool and want to make use of GDPicture.Net dll version 8.5 in our upgraded application. So, we are evaluating the changes and hence downloaded trial version of GDPicture.Net 8.5.

We found that when we call the "object.TwainGetSourceCount(Me.Handler)" method, it always returns the count as "0". Though on same machine we have Pro version installed which gives the count "1" and even in debug mode we get the count as "1" if we use Pro version dll. But the latest GDPicture.Net dll never returns count "1". Scanner is connected and everything is up, we are just calling this method.

Configuration:
Windows 7 64 bit (Also, tried on Windows XP 32 Bit but GDPicture.Net dll method TwainGetSourceCount() still returns "0")
Tried various options like
-setting Target CPU to "x64" , "AnyCPU" on 64 bit machine
-setting Target CPU to "x86" and "AnyCPU" on 32 bit machine, still same result.

Please let us know, if we are missing something here. Thanks

Thanks in Advance

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

Re: TwainGetSourceCount() always return count 0

Post by Loïc » Wed May 30, 2012 11:19 am

Hello,

First if your TWAIN driver is 32-bit you have to target your app to X86. And if your driver is 64-bit (very rare actually) you have to target your app to X64.

GdPicture.NET uses the latest TWAIN Data Source Manager 2.2 by default. Some old scanners do not support this DSM. In such case, you have to use the TWAIN 1.9 by specifying the path of the TWAIN_32.dll.

Here a sample:

Code: Select all

oGdPictureImaging1.TwainSetCustomDSMPath("c:\windows\TWAIN_32.dll")
Let me know if your problem persists.

With best regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest