General failure in response to DAT_IMAGENATIVEXFER

Discussions about TWAIN & WIA scanning in GdPicture.NET using GdPictureImaging.
Post Reply
Paul
Posts: 8
Joined: Sat Oct 13, 2007 8:25 am

General failure in response to DAT_IMAGENATIVEXFER

Post by Paul » Wed Oct 17, 2007 1:50 am

Problems running on Visual FoxPro. I'm trying to run the VFP sample code, and I get this error:

General failure in response to DAT_IMAGENATIVEXFER. Bad protocol error.

... followed by

Transfer Fail. TWRC_FAILURE [no details available]

What's going on? Can you fix it? I really would like to use GdTwain in this app.

Paul
Posts: 8
Joined: Sat Oct 13, 2007 8:25 am

Post by Paul » Wed Oct 17, 2007 2:05 am

The error occurs on the call to TwainAcquireToImageID. GetStat returns 34.

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

Post by Loïc » Wed Oct 17, 2007 11:28 am

Hi,

Your acquisition device seems to doesn't support the native transfer mode.

Could you run this vfp code and report here what are the message box you can see ?


Code: Select all

oTwain = CREATEOBJECT("gdtwain.twain")


with oTwain as gdtwain.twain
     &&Open the source
     IF .TwainOpenDefaultSource()
        &&Set the source parameters
        .TwainSetDebugMode(.T.)
        .TwainSetHideUI(.T.)
        .TwainSetCurrentPixelType(2)  &&Color
        &&Acquire & Save
        nImageID = .TwainAcquireToImageID
        .SaveAsJpeg("c:\image.jpg")
        &&Close the source
        .TwainCloseSource
     ELSE
        MESSAGEBOX("Can't open default source")
     ENDIF 
endwith


PS: Please, use the last edition of GdTwain OCX.
If you are using the PRO edition you need to replace this lines:

Code: Select all

oTwain = CREATEOBJECT("gdtwain.twain")


with oTwain as gdtwain.twain
by this one

Code: Select all

oTwain = CREATEOBJECT("gdtwainpro.twain")


with oTwainpro as gdtwain.twain

Paul
Posts: 8
Joined: Sat Oct 13, 2007 8:25 am

Post by Paul » Wed Oct 17, 2007 4:48 pm

Thank you for your response.

Today it works. Don't ask me why, because I don't know.

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

Post by Loïc » Thu Oct 18, 2007 11:08 am

Thanks for the return.

Strange problem. Maybie it comes from your twain driver.

Regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest