Home › Forums › TWAIN Classic › C++ Open Data Source problem on Canon MF4730 (Twain 1.8)
- This topic has 0 replies, 1 voice, and was last updated 10 years, 4 months ago by kachurov.
Viewing 1 post (of 1 total)
- AuthorPosts
Hello!
I am using the following code on Visual Studio C++ to try to “Load and initialize the specified Source” (DG_CONTROL/DAT_IDENTITY/MSG_OPENDS call) (TWAIN State 3 to 4).
// Call
m_bDSOpen = CallTwainProc(&m_AppId,NULL,DG_CONTROL,DAT_IDENTITY,MSG_OPENDS,(TW_MEMREF)&m_Source);
// Function
BOOL CTwain::CallTwainProc(pTW_IDENTITY pOrigin,pTW_IDENTITY pDest,
TW_UINT32 DG,TW_UINT16 DAT,TW_UINT16 MSG,
TW_MEMREF pData)
{
if(IsValidDriver())
{
USHORT ret_val;
ret_val = (*m_pDSMProc)(pOrigin,pDest,DG,DAT,MSG,pData);
m_returnCode = ret_val;
if(ret_val != TWRC_SUCCESS)
{
(*m_pDSMProc)(pOrigin,pDest,DG_CONTROL,DAT_STATUS,MSG_GET,&m_Status);
}
return (ret_val == TWRC_SUCCESS);
}
else
{
m_returnCode = TWRC_FAILURE;
return FALSE;
}
}
On Multifunctional Canon MF4730 (Twain 1.8) – my program crash without any errors trying to Open Data Source (DG_CONTROL/DAT_IDENTITY/MSG_OPENDS call)
But on Epson Gt-1500 (Twain 1.8) and Canon CanoScan 9000F Mark II (Twain 1.9) – all ok, Data Source opens successfully.What could be the problem?
Any suggestions greatly appreciated, thanks.
- AuthorPosts
Viewing 1 post (of 1 total)