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 11:20 am #24284
gabe
Participant
  • Topics - 9
  • Replies - 583
  • Total Posts - 592

nope, that tells the source where to put the file after the you’ve been notified that the source is ready to deliver the file to you

to tell the source to use file for the XferMode I use something like:


Public Function SetXferMech(ByVal value As String) As Boolean

Dim xferMechVal As Enumerations.XferMech
Select Case value

Case Enumerations.XferMech.File.ToString
xferMechVal = Enumerations.XferMech.File

Case Enumerations.XferMech.Memory.ToString
xferMechVal = Enumerations.XferMech.Memory

Case Else
xferMechVal = Enumerations.XferMech.Native

End Select

'SetXferMode(_Profile.TransferMode)
'//
alias the namespace for shorter calls (not needed, just prettier)
Dim cap_XferMech As Enumerations.Capability = Enumerations.Capability.Icap_XferMech

'//
prep the container
Dim XferMechOneval As New DataStructures.twOneValue
XferMechOneval.ItemType = DataStructures.twCapability.CapType(cap_XferMech)
XferMechOneval.Item = xferMechVal

'//
create the CapStruc with the container
Dim capXferMech As New DataStructures.twCapability(cap_XferMech, XferMechOneval)

'//
set the Cap
Dim retBool As Boolean = OperationTriplets.Control.Capability.Set(capXferMech)

Return retBool

End Function

and I call that function after/If OpenDs returns twSuccess but before EnableDs gets called

.

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

  • Hello world
  • Girls of Desire: All babes in one place, crazy, art
  • 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
  • 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