DataTransfer Example for Visual Basic

Dim RasterTwain As New LEADRasterTwain_U

RasterTwain.InitSession hWnd
RasterTwain.SelectSource
RasterTwain.EnableMethodErrors = False
RasterTwain.InitSession hWnd
RasterTwain.SelectSource
RasterTwain.GetProperties
RasterTwain.DataTransfer.FillOrder = L_TWBO_LSBFIRST
RasterTwain.DataTransfer.BufferMemoryCompression = L_TWCP_NONE
RasterTwain.DataTransfer.TransferMode = L_TWSX_MEMORY
RasterTwain.DataTransfer.ScanFileFormat = L_TWFF_BMP
RasterTwain.DataTransfer.MemoryBufferSize = 1024
RasterTwain.DataTransfer.EnableSaveMultipageFile = False
RasterTwain.DataTransfer.EnableAppendToFile = False
RasterTwain.DataTransfer.EnableDumpMemoryBuffersToFile = True
RasterTwain.FileTransferName = "c:\test.bmp"
RasterTwain.SetProperties
RasterTwain.EndSession