TWAIN Working Group

Newsletter Signup
Donate
Help keep TWAIN free
  • About TWAIN
    • What’s New?
    • News
    • Events
    • Membership
    • Consider a Donation
    • Contact Us
  • Why TWAIN?
  • Developers
    • Driver Developer
    • Application Developer
    • TWAIN Features
    • Specification & Tools
    • Self Certification Process
  • Support Forums
  • Scanner End-User
  • Find Certified Drivers
    • Facebook
    • LinkedIn
    • Vimeo

Reply To: Scanning directly into a file

Forums › TWAIN Classic › Scanning directly into a file › Reply To: Scanning directly into a file

January 22, 2008 at 5:38 am #24282
gabe
Participant
  • Topics - 9
  • Replies - 583
  • Total Posts - 592

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.

.

Quick Links

Service Providers
TWAIN Support Forums
Membership
Contact Us
Privacy Policy

Newsletter Signup

TWAIN Working Group Family

TWAIN Working Group
TWAIN Direct®
TWAIN Resources
TWAIN Certified Drivers
PDF/raster

  • Facebook
  • GitHub
  • LinkedIn
  • Vimeo

Recent Topics

  • EPSON V600 TWAIN and WIA on Windows 10
  • When and how to use WaitForEvents command ?
  • Problem enumerating list of installed scanners in windows server 2012
  • Failed to create TWAIN progress! Error code is 1260.
  • To get the list of scanners from javascript client side (browser)
  • Quarterly Newsletter
  • TWAIN Working Group Membership
  • Logo Usage
  • TWAIN License
  • Contact Us
Privacy Policy • Privacy Tools • Copyright © 2021 TWAIN Working Group • by iHwy, LLC • Log in