LTwain::EnableDuplex

#include "ltwrappr.h"

L_INT LTwain::EnableDuplex (bEnableDuplex)

L_BOOL bEnableDuplex;

/* flag */

Enables or disables the duplex mode.

Parameter

Description

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.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function internally sets the duplex enabled capability CAP_DUPLEXENABLED. For more information on these capabilities, refer to http://www.twain.org/ and click on TWAIN Specification (Version 1.9).

To get the current values of this capability, call the LTwain::GetDuplexOptions function.

Required DLLs and Libraries

LTTWN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LTwain::SetTransferOptions, LTwain::GetTransferOptions, LTwain::GetSupportedTransferMode, LTwain::SetResolution, LTwain::GetResolution, LTwain::SetImageFrame, LTwain::GetImageFrame, LTwain::SetImageUnit, LTwain::GetImageUnit, LTwain::SetImageBitsPerPixel, LTwain::GetImageBitsPerPixel, LTwain::SetImageEffects, LTwain::GetImageEffects, LTwain::SetAcquirePageOptions, LTwain::GetAcquirePageOptions, LTwain::SetRGBResponse, LTwain::ShowProgress, LTwain::GetDuplexOptions, LTwain::SetMaxXferCount, LTwain::GetMaxXferCount

Topics:

Getting and Setting Capabilities

 

TWAIN Functionality: Capability Functions

Example

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;
}