Returns or sets the Data Source's transfer mode.

Data type



.TransferMode = EnumDWT_TransferMode.TWSX_FILE;


Use this property after OpenSource() and before AcquireImage().

Value Description
TWSX_NATIVE (0) Every Source must support this transfer mode. NATIVE mode is the default mode. In this mode, the whole
image is transfered in a single memory block.
TWSX_FILE (1) DISK FILE mode is not required by TWAIN specification.
In this mode, the image is transfered to a specified file directly. The disk file mode is ideal when transferring large images that might encounter memory limitations with Native mode.
TWSX_MEMORY (2) Every Source must support this transfer mode. Although this mode is the
most complex, Dynamic Web TWAIN handles all the transfer details, making it as simple
as NATIVE mode.

The default value for TransferMode is TWSX_NATIVE (0).

For DISK FILE mode - TWSX_FILE (1), since it is not required by TWAIN, the application needs to make sure it is supported by the current Source. One way to do this is to check the value of TransferMode property after setting it and see if it is still TWSX_FILE (1). More details can be found in the example below.

When an error occurs, check ErrorCode or ErrorString for error information.


    DWObject.TransferMode = EnumDWT_TransferMode.TWSX_FILE;
    if(DWObject.TransferMode == EnumDWT_TransferMode.TWSX_FILE){
        if(DWObject.SetFileXferInfo("C:\\WebTWAIN.bmp", EnumDWT_FileFormat.TWFF_BMP)){
            DWObject.IfShowUI = false;		

See also