Enables or disables the duplex mode.
#include "ltwrappr.h"
L_INT LTwain::EnableDuplex (bEnableDuplex)
Flag that indicates whether to enable or disable the duplex mode. Possible values are:
Value | Meaning |
---|---|
TRUE | Enables the duplex mode. |
FALSE | Disables the duplex mode. |
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This function internally sets the duplex enabled capability CAP_DUPLEXENABLED. For more information on these capabilities, refer to the TWAIN specification.
To get the current values of this capability, call the LTwain::GetDuplexOptions function.
L_INT LTwain__EnableDuplexExample(LTwain * plTwain)
{
L_INT nRet;
L_BOOL bEnableDuplex;
L_INT nDuplexMode;
L_INT nMaxXfer;
nRet = plTwain->GetDuplexOptions(&bEnableDuplex, &nDuplexMode);
if(nRet != SUCCESS)
return nRet;
if (bEnableDuplex != TRUE)
{
nRet = plTwain->EnableDuplex(TRUE);
if(nRet != SUCCESS)
return nRet;
}
nRet = plTwain->GetMaxXferCount (&nMaxXfer);
if(nRet != SUCCESS)
return nRet;
if (nMaxXfer != 10)
{
nRet = plTwain->SetMaxXferCount (10);
if(nRet != SUCCESS)
return nRet;
}
return SUCCESS;
}