Home › Forums › TWAIN Classic › Scanning directly into a file › Reply To: Scanning directly into a file
January 22, 2008 at 5:38 am #24282
you’ll have to tweak this from vb.net, but for managed code this works.
'TW_SETUPFILEXFER
'''
''' Describes the file format and file specification information for a transfer through a disk file.
'''
''' TW_SETUPFILEXFER from TWAIN Spec
_
Public Structure twSetupFileXfer
#Region " C++ Reference "
'/* DAT_SETUPFILEXFER. Sets up DS to application data transfer via a file. */
'typedef struct {
' TW_STR255 FileName;
' TW_UINT16 Format; /* Any TWFF_ constant */
' TW_INT16 VRefNum; /* Used for Mac only */
'} TW_SETUPFILEXFER, FAR * pTW_SETUPFILEXFER;
#End Region
'''
''' A complete file specifier to the target file. On Windows, be sure to include the
''' complete pathname.
'''
''' Original type was TW_STR255.
_
Public FileName As String
'''
''' The format of the file the Source is to fill. Fill with the correct constant—as
''' negotiated with the Source—of type TWFF_xxxx.
'''
''' Original type was TW_UINT16
Public Format As Enumerations.ImageFileFormat
'''
''' The volume reference number for the file. This applies to Macintosh only. On
''' Windows, fill the field with TWON_DONTCARE16.
'''
''' Original type was TW_INT16
Public VrefNum As Int16
End Structure
and like Kaij said, you’ll have to set XferMode to File.
.