Forum Replies Created
- AuthorPosts
Hello andrewfife,
I have almost the exact same issue with a Xerox DocuMate 262 scanner. The Twain driver for this scanner was made by Visioneer.
I am able to get and set capbilities with the scanner just fine. However on the call to transfer to the image (whether showing the UI or not, or whether XferMode is set to Native, Memory, or File) I get an access violation.
Also to note, this issue only occurs when calling this function from within a .NET application and on a 64 bit operating system, but both the Twain Driver and .NET application are 32 bit. I explicitly make the Application x86 (not using AnyCPU).
The same driver and application work fine on a 32 bit OS.
I’m simply passing in the App identity, Source identity, the triplets (DG_CONTROL, DAT_IMAGENATIVEXFER, MSG_GET) and a TW_MEMREF set to NULL. Making this call results in an immediate exception: Access Violation.
A call to the driver (made just before this one) to get the ImageInfo succeeds which tells me the DLL handle, the function pointer, and the two TW_IDENTITY structures are fine. The only other variable in question is the TW_MEMREF which is supposed to be NULL, so I don’t believe it is the issue either.
The real kicker is that the exact same code compiled as C++ works perfectly. I have ran both in debuggers (separately), took screen shots of all the values of all the variables and every single one of them are the same.
The only difference is that the failing code is ran through a .NET application. If you found the resolution to this, please post again.
- AuthorPosts