Home › Forums › TWAIN Classic › HP Scanjet 7650 TWRC_FAILURE
- This topic has 6 replies, 5 voices, and was last updated 12 years, 9 months ago by Tech01.
- AuthorPosts
Hi,
I am using HP Scanjet 7650 scanner connected to my application using Twain 2.1.
when I run the scanning by single page from my application, it works well, but when I run the multiple Image Scanning I get TWRC_FAILUREDo some one know what does it mean?
is this scanner not compatible with twain 2.1 ?
Thanks
@mimi wrote:
Hi,
I am using HP Scanjet 7650 scanner connected to my application using Twain 2.1.
when I run the scanning by single page from my application, it works well, but when I run the multiple Image Scanning I get TWRC_FAILUREDo some one know what does it mean?
is this scanner not compatible with twain 2.1 ?
Thanks
If it was not compatible with TWAIN, then you would not be able to even scan single pages. Without more information about your applications code, I can’t help with any guesses about why it works with single pages but not with the ADF.
My application is Java JEE wich use this c++ code that corresponds to the loop to run multi image scan and throw the TWRC_FAILURE error:
while (GetMessage ((LPMSG) &msg, 0, 0, 0))
{
// Each window message must be forwarded to the currently open data
// source.
event.pEvent = (TW_MEMREF) &msg;
event.TWMessage = MSG_NULL;
g_rc = (*g_pDSM_Entry) (&g_AppID,
&srcID,
DG_CONTROL,
DAT_EVENT,
MSG_PROCESSEVENT,
(TW_MEMREF) &event);
// If the message does not correspond to a data source event, we must
// dispatch it to the appropriate Windows window.
if (g_rc == TWRC_NOTDSEVENT)
{
TranslateMessage ((LPMSG) &msg);
DispatchMessage ((LPMSG) &msg);
continue;
}
// If the currently open data source is requesting that it is ready to
// begin image transfers, perform those transfers.
if (event.TWMessage == MSG_XFERREADY)
{
nextImage:
// Obtain information about the next image to be transferred.
TW_IMAGEINFO ii;
g_rc = (*g_pDSM_Entry) (&g_AppID,
&srcID,
DG_IMAGE,
DAT_IMAGEINFO,
MSG_GET,
(TW_MEMREF) &ii);
// If unable to obtain image information ...
if (g_rc == TWRC_FAILURE)
{
// Cancel all remaining image transfers.
(*g_pDSM_Entry) (&g_AppID,
&srcID,
DG_CONTROL,
DAT_PENDINGXFERS,
MSG_RESET,
(TW_MEMREF) &pxfers);
// Throw exception and break out of event loop.
throwJTE (env, "msg_error_unable_to_obtain_image_information_acquire");
break;
}
...
....
....
The code you have posted is not specific to TWAIN 2.1. You may search in a different direction.
Best regards,
Kaij
if this were my code, I would test the code with a different device, try the code with a Kodak i30 driver in simulation mode.
If the Kodak driver in simulation mode has the same error then your code is in error.
If the Kodak driver works then you have potentially found a problem the the HP driver’s twain implementation..
I think I found the pb !!!
I installed an other scanner, FUJITSU fi-6140 scanner, and on the scanner list, I have 2 scanner access:
FUJITSU fi-6140dj 9.21(32-32)
WIA-fi-6140dj 1.0 (32-32)When I chose the 1st one, the scanner does not work, but witjh the 2nd one it’s ok!!
can you tell me why do I have 2 scanner access for the same scanner?
I think it is two drivers – for WIA and for TWAIN access to the same device.
- AuthorPosts