Home › Forums › TWAIN Classic › Scanning directly into a file › Reply To: Scanning directly into a file
January 22, 2008 at 11:20 am #24284
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
.