Leadtools.Twain Namespace > TwainSession Class : FindConfiguration Method |
public RasterCollection<TwainFastConfiguration> FindConfiguration( int bitsPerPixel, TwainTransferMechanism transferMechanism, int bufferIteration )
'Declaration Public Function FindConfiguration( _ ByVal bitsPerPixel As Integer, _ ByVal transferMechanism As TwainTransferMechanism, _ ByVal bufferIteration As Integer _ ) As RasterCollection(Of TwainFastConfiguration)
'Usage Dim instance As TwainSession Dim bitsPerPixel As Integer Dim transferMechanism As TwainTransferMechanism Dim bufferIteration As Integer Dim value As RasterCollection(Of TwainFastConfiguration) value = instance.FindConfiguration(bitsPerPixel, transferMechanism, bufferIteration)
public RasterCollection<TwainFastConfiguration> FindConfiguration( int bitsPerPixel, TwainTransferMechanism transferMechanism, int bufferIteration )
function Leadtools.Twain.TwainSession.FindConfiguration( bitsPerPixel , transferMechanism , bufferIteration )
public: RasterCollection<TwainFastConfiguration>^ FindConfiguration( int bitsPerPixel, TwainTransferMechanism transferMechanism, int bufferIteration )
Public Sub FindConfigurationExample(ByVal parent As IWin32Window) Dim session As TwainSession = New TwainSession() session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None) Try Dim twFastConfigs As RasterCollection(Of TwainFastConfiguration) = session.FindConfiguration(1, TwainTransferMechanism.Memory, 5) MessageBox.Show("GetScanConfigs method was successful.") Dim msg As String msg = String.Format("Scan Configuration count = {0}" & Constants.vbLf, twFastConfigs.Count) MessageBox.Show(msg) msg = String.Format("Transfer Mode = {0}" & Constants.vbLf & "File Format = {1}" & Constants.vbLf & "Buffer Size = {2}" & Constants.vbLf & "Required Time = {3}" & Constants.vbLf, twFastConfigs(0).TransferMechanism, twFastConfigs(0).ImageFormat, twFastConfigs(0).BufferSize, twFastConfigs(0).RequiredTime) MessageBox.Show(msg, "Scan Configurations...") Catch ex As Exception MessageBox.Show(ex.Message, "Error!!!") End Try session.Shutdown() End Sub
public void FindConfigurationExample(IWin32Window parent) { TwainSession session = new TwainSession(); session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None); try { RasterCollection<TwainFastConfiguration> twFastConfigs = session.FindConfiguration(1, TwainTransferMechanism.Memory, 5); MessageBox.Show("GetScanConfigs method was successful."); string msg; msg = String.Format("Scan Configuration count = {0}\n", twFastConfigs.Count); MessageBox.Show(msg); msg = String.Format("Transfer Mode = {0}\nFile Format = {1}\nBuffer Size = {2}\nRequired Time = {3}\n", twFastConfigs[0].TransferMechanism, twFastConfigs[0].ImageFormat, twFastConfigs[0].BufferSize, twFastConfigs[0].RequiredTime); MessageBox.Show(msg, "Scan Configurations..."); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error!!!"); } session.Shutdown(); }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2