LTwain::SetTransferOptions

#include "ltwrappr.h"

L_INT LTwain::SetTransferOptions(pTransferOpts);

pTRANSFEROPTIONS pTransferOpts;

/* pointer to a structure */

Sets the options used for transferring data from the current TWAIN source.

Parameter

Description

pTransferOpts

Pointer to the TRANSFEROPTIONS structure that contains the transfer options to set.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

To obtain the current transfer options, call the LTwain::GetTransferOptions 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::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::EnableDuplex, LTwain::GetDuplexOptions, LTwain::SetMaxXferCount, LTwain::GetMaxXferCount

Topics:

Getting and Setting Capabilities

 

TWAIN Functionality: Capability Functions

Example

void TestTransferOptions(LTwain * plTwain)
{
   L_INT nRet = SUCCESS; 

   L_UINT TransferModes = 0; 
   nRet = plTwain->GetSupportedTransferMode (&TransferModes); 
   if (nRet == SUCCESS) 
   {
      if ((TransferModes & TWAIN_TRANSFER_FILE) == TWAIN_TRANSFER_FILE) 
         MessageBox(NULL, TEXT("File transfer is supported"), TEXT("Notice!"), MB_OK); 
   }

   TRANSFEROPTIONS TransOpts; 
   memset(&TransOpts, 0, sizeof(TRANSFEROPTIONS)); 
   plTwain->GetTransferOptions (&TransOpts, sizeof(TRANSFEROPTIONS)); 
   if (nRet == SUCCESS) 
   {
      if (TransOpts.TransferMode != TWAIN_TRANSFER_FILE) 
      {
         TransOpts.TransferMode = TWAIN_TRANSFER_FILE; 
         strcpy(TransOpts.szFileName, TEXT("c:\\test.bmp"));
         TransOpts.uFileFormat = TWFF_BMP; 
      }

      plTwain->SetTransferOptions(&TransOpts); 
   }
}