DataTransfer Example for Visual Basic

Private Sub Command3_Click()
   Dim RasterTwain As LEADRasterTwain

   Set RasterTwain = New LEADRasterTwain
   RasterTwain.EnableMethodErrors = False
   RasterTwain.InitSession hWnd

   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
End Sub