←Select platform

TwainSourceInformation Structure

Summary

Provides information about a TWAIN Data Source.

Syntax

C#
VB
C++
[DataContractAttribute()] 
public struct TwainSourceInformation 
<DataContractAttribute()> 
Public Structure TwainSourceInformation  
   Inherits System.ValueType 
[DataContractAttribute()] 
public value class TwainSourceInformation : public System.ValueType  

Example

C#
VB
using Leadtools; 
using Leadtools.Twain; 
 
public void TwainSourceInformationExample(IntPtr 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 = {0}\nProduct Family Name = {1}\nManufacturer Name = {2}\nTwain source supported version = {3}\n", 
         srcInfo[i].Name, srcInfo[i].ProductFamily, srcInfo[i].Manufacturer, srcInfo[i].TwainSourceVersion); 
 
      MessageBox.Show(buffer); 
   } 
 
   session.Shutdown(); 
} 
Imports Leadtools 
Imports Leadtools.Twain 
 
Public Sub TwainSourceInformationExample(ByVal parent As IntPtr) 
   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 = {0}" & Constants.vbLf & "Product Family Name = {1}" & Constants.vbLf & 
                             "Manufacturer Name = {2}" & Constants.vbLf & "Twain source supported version = {3}" & 
                             Constants.vbLf, srcInfo(i).Name, srcInfo(i).ProductFamily, srcInfo(i).Manufacturer, 
                             srcInfo(i).TwainSourceVersion) 
 
      MessageBox.Show(buffer) 
      i += 1 
   Loop 
 
   session.Shutdown() 
End Sub 

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Twain Assembly