Unable to scan documents on 64bit

Discussions about TWAIN & WIA scanning in GdPicture.NET using GdPictureImaging.
Post Reply
BenV
Posts: 21
Joined: Thu Dec 02, 2010 4:54 pm

Unable to scan documents on 64bit

Post by BenV » Thu Dec 02, 2010 5:08 pm

Hello

The following message occurs in the immedaite window every time i try to execute a Twain method: "A first chance exception of type 'System.Exception' occurred in GdPicture.NET.64.dll"

I'm running this application on a 64 bit laptop with the GdPicture.NET 64 bit dll. Here's a sample of the code:

Code: Select all

Imports GdPicture
Public Class ScanTool
    Dim oGDPictureImaging As New GdPictureImaging
    Private Sub ScanTool_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        oGDPictureImaging.SetLicenseNumber("XXX")

        oGDPictureImaging.TwainAcquireToGdPictureImage(Me.Handle)
    End Sub
End Class

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

Re: Unable to scan documents on 64bit

Post by Loïc » Thu Dec 02, 2010 6:40 pm

Hi Ben,

I tried your code with success on a win 7 64 bit.

Ensure to have targeted your main app to x64 processor. All is clearly explained in the reference guide.

Let me know if the problem persists.

Kind regards,

Loïc

BenV
Posts: 21
Joined: Thu Dec 02, 2010 4:54 pm

Re: Unable to scan documents on 64bit

Post by BenV » Fri Dec 03, 2010 10:01 am

Thanks for helping me out Loïc.

I did as you told and the problem remains. I forgot to mention something in my previous post. The TWAIN example in de 32 bit directory works. I checked the reference but it uses an assembly and I don't really know what that is. I always refere to the dll in a local map in the project. Refering to the 32 bit dll gives me an error saying that VS can't find the file. Refering to the 64 bit results in the "A first chance exception of ..." warning.

[EDIT]
I tested the other methods like opening a file and showing it in de Viewer and that does work. So I don't think the Target CPU (which was now set to AnyCPU) was the problem. Maybe it's the TWAIN drivers, but that doesn't explain why the 32 bit TWAIN sample worked, does it? I'm kinda new to the whole TWAIN concept and have no clue on how to check TWAIN Data Sources and stuff.

[EDIT 2]
Oke, different problem. I tried to start a TWAIN log and I get this exception: "The version of GdPicture.NET.twain.gdtwain.64.dll is invalid...", but as I recall from the other problem the version I have is 7.2.0.1. Which is the latest one?

[EDIT 3]
I think my problem is solved, but I'm gonna test it a little more first to be sure.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests