Leadtools TWAIN (Leadtools.Twain assembly)
LEAD Technologies, Inc

TwainSourceInformation Structure

Example 





Members 
Provides information about a TWAIN Data Source.
Object Model
TwainSourceInformation Structure
Syntax
public struct TwainSourceInformation : System.ValueType 
'Declaration
 
Public Structure TwainSourceInformation 
   Inherits System.ValueType
'Usage
 
Dim instance As TwainSourceInformation
public class TwainSourceInformation
JAVASCRIPT_NOSTRUCTS
public value class TwainSourceInformation : public System.ValueType 
Example
 
Public Sub TwainSourceInformationExample(ByVal parent As IWin32Window)
   Dim buffer As String

   Dim session As TwainSession = New TwainSession()
   session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None)

   Dim srcInfo As TwainSourceInformation() = session.QuerySourceInformation()

   Dim i As Integer = 0
   Do While i < srcInfo.Length
      buffer = String.Format("Source Name = %s" & Constants.vbLf & "Product Family Name = %s" & Constants.vbLf & "Manufacturer Name = %s" & Constants.vbLf, srcInfo(i).Name, srcInfo(i).ProductFamily, srcInfo(i).Manufacturer)

      MessageBox.Show(buffer)
      i += 1
   Loop

   session.Shutdown()
End Sub
public void TwainSourceInformationExample(IWin32Window parent)
{
   string buffer;

   TwainSession session = new TwainSession();
   session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None);

   TwainSourceInformation[] srcInfo = session.QuerySourceInformation();

   for (int i=0; i < srcInfo.Length; i++)
   {
      buffer = String.Format("Source Name = %s\nProduct Family Name = %s\nManufacturer Name = %s\n",
         srcInfo[i].Name, srcInfo[i].ProductFamily, srcInfo[i].Manufacturer);

      MessageBox.Show(buffer);
   }

   session.Shutdown();
}
Requirements

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

See Also

Reference

TwainSourceInformation Members
Leadtools.Twain Namespace
QuerySourceInformation Method
SelectedSourceName Method

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.