Click or drag to resize

TwainControllerTwainDataTransfer Event

This event fires after the data has been transferred but before it has been processed by DotTwain.

Namespace:  Atalasoft.Twain
Assembly:  Atalasoft.DotTwain (in Atalasoft.DotTwain.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public event TwainDataTransferEventHandler TwainDataTransfer

Value

Type: Atalasoft.TwainTwainDataTransferEventHandler
Remarks
This event allows for processing of data DotTwain does not support, such as audio or unique image formats. If this data should not be processed by DotTwain, set the DataHandled property of the TwainDataTransferEventArgs to true.
Examples
DataTransferCS (C#)
private void acquisition_TwainDataTransfer(object sender, TwainDataTransferArgs e)
{
    // Process the data instead of letting DotTwain do it.
    e.DataHandled = true;

    // ... processing ...

    // Free the memory.
    System.Runtime.InteropServices.Marshal.FreeHGlobal(e.Data);
}
DataTransferVB (Visual Basic)
Private  Sub acquisition_TwainDataTransfer(ByVal sender As Object, ByVal e As TwainDataTransferArgs)
    ' Process the data instead of letting DotTwain do it.
    e.DataHandled = True

    ' ... processing ...

    ' Free the memory.
    System.Runtime.InteropServices.Marshal.FreeHGlobal(e.Data)
End Sub
See Also