Leadtools TWAIN (Leadtools.Twain assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.30
TwainSourceInformation Structure
See Also  Members   Example
Leadtools.Twain Namespace : TwainSourceInformation Structure



Provides information about a TWAIN Data Source.

Object Model

TwainSourceInformation Structure

Syntax

Visual Basic (Declaration) 
Public Structure TwainSourceInformation 
   Inherits System.ValueType
Visual Basic (Usage)Copy Code
Dim instance As TwainSourceInformation
C# 
public struct TwainSourceInformation : System.ValueType 
C++/CLI 
public value class TwainSourceInformation : public System.ValueType 

Example

Visual BasicCopy Code
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
C#Copy Code
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();
}

Inheritance Hierarchy

System.Object
   System.ValueType
      Leadtools.Twain.TwainSourceInformation

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also