- This topic has 1 reply, 2 voices, and was last updated 7 years, 3 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
Forums › TWAIN Classic › How to scan multiple pages in Flatbed scanner
Please give me the suggestion on how to scan multiple pages in flatbed scanner like HP scanjet G4010 model. Here is my scenario… Once scanned a first document the app will ask the user confirmation like “do u want to scan next page?”. I have done this task… but If user click ‘yes’ the scanner will start to scan next page.
I have a function it will transfer the image from scanner to application. In order to do multi doc transfer I did a while loop on this function. But after the first document scanned, the returnCode has went to TWRC_FAILURE state instead of the state TWRC_XFERDONE. Because of this I am not able to scan the next document.
function getImage(){
m_returnCode = CallTwainProc(&m_AppId,&m_Source,DG_IMAGE,DAT_IMAGENATIVEXFER,MSG_GET,&hBitmap);
switch(m_returnCode)
{
case TWRC_XFERDONE:
g_vHandle.push_back(hBitmap);
m_bSucess = TRUE;
break;
case TWRC_CANCEL:
break;
case TWRC_FAILURE:
CancelTransfer();
m_bSucess = FALSE;
return FALSE;
}
}
Thanks,
Yoga V
Hi Yoga,
Did you check the error message to see why it went to failure?
Catherine Sea
http://www.dynamsoft.com