TWAIN ActiveX/Plug-in Windows/Mac HTTP Control/SDK

TransferMode Property

Description

Sets or returns the transfer mode.

Support information

ActiveX Edition Plug-in Edition Mac Edition
Since V2.0 Since V2.0 Since V6.4

Data type

Enumerated value/Integer

Value Description
TWSX_NATIVE (0) 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) MEMORY mode is also required by TWAIN, like NATIVE mode. Although this mode is the most complex, Dynamic TWAIN handles the tranfer details, making it as simple as NATIVE mode.

Syntax

ObjectName.TransferMode


Remarks

The default value of the TransferMode property is TWSX_NATIVE (0). 

For DISK FILE mode, 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 checking the TransferMode property after OpenSource() to see if it is still TWSX_FILE. The following is a sample:

    Twain.OpenSource
    Twain.TransferMode = TWSX_FILE    
    If (Twain.TransferMode = TWSX_FILE) Then       
        If (Twain.SetFileXFERInfo("c:\Twain.bmp", TWFF_BMP) = True) Then
	    Twain.IfShowUI = FALSE		
            Twain.EnableSource 
        End If
    End If

When an error occurs and IfThrowException property is TRUE, an exception will be thrown. Check ErrorCode property and ErrorString property for error information.

See also

OpenSource(), SetFileXFERInfo()




TWAIN ActiveX | TWAIN Plug-in | TWAIN Control | TWAIN SDK | Scanner COM
Software Configuration Management | Version Control | Source Control
Copyright © 2012 Dynamsoft Corporation. All Rights Reserved.