Home › Forums › TWAIN Classic › Scanning directly into a file › Reply To: Scanning directly into a file
I pumped that code through a VB to C# converter (see http://labs.developerfusion.co.uk/convert/vb-to-csharp.aspx)
so it’s easier for me to follow, and got the following:
public bool SetXferMech(string value)
{
Enumerations.XferMech xferMechVal;
switch (value) {
case Enumerations.XferMech.File.ToString:
xferMechVal = Enumerations.XferMech.File;
break;
case Enumerations.XferMech.Memory.ToString:
xferMechVal = Enumerations.XferMech.Memory;
break;
default:
xferMechVal = Enumerations.XferMech.Native;
break;
}
//SetXferMode(_Profile.TransferMode)
////
alias the namespace for shorter calls (not needed, just prettier)
Enumerations.Capability cap_XferMech = Enumerations.Capability.Icap_XferMech;
//prep the container
DataStructures.twOneValue XferMechOneval = new DataStructures.twOneValue();
XferMechOneval.ItemType = DataStructures.twCapability.CapType(cap_XferMech);
XferMechOneval.Item = xferMechVal;
//create the CapStruc with the container
DataStructures.twCapability capXferMech = new DataStructures.twCapability(cap_XferMech, XferMechOneval);
//set the Cap
bool retBool = OperationTriplets.Control.Capability.Set(capXferMech);
return retBool;
}
Where can I download your classes eg. OperationTriplets.Control.Capability.Set – I assume that equates to
DSM_Entry(..,..,Control, Capability, Set, Val);
//OperationTriplets.Control.Capability.Set equates to :