Leadtools TWAIN (Leadtools.Twain assembly)

Startup2 Method

Show in webframe
Example 





The parent window, this may not be NULL.
Optional name of the application's manufacturer.
Optional product family name.
Version information.
Optional application name.
Flag determines the Startup method behavior
Specify which language to be shown in UI
Specify which country to be shown in UI
Initializes the TWAIN session.
Syntax
'Declaration
 
Public Sub Startup2( _
   ByVal owner As IWin32Window, _
   ByVal manufacturer As String, _
   ByVal productFamily As String, _
   ByVal version As String, _
   ByVal application As String, _
   ByVal flags As TwainStartupFlags, _
   ByVal language As TwainLanguage, _
   ByVal country As TwainCountry _
) 
'Usage
 
Dim instance As TwainSession
Dim owner As IWin32Window
Dim manufacturer As String
Dim productFamily As String
Dim version As String
Dim application As String
Dim flags As TwainStartupFlags
Dim language As TwainLanguage
Dim country As TwainCountry
 
instance.Startup2(owner, manufacturer, productFamily, version, application, flags, language, country)

            

            

Parameters

owner
The parent window, this may not be NULL.
manufacturer
Optional name of the application's manufacturer.
productFamily
Optional product family name.
version
Version information.
application
Optional application name.
flags
Flag determines the Startup method behavior
language
Specify which language to be shown in UI
country
Specify which country to be shown in UI
Remarks
Please note that a TWAIN session is a communication session between Leadtools TWAIN and your TWAIN sources. The internal TWAIN session handle that is created provides the user access to this TWAIN session. This method must be called before calling any other methods that require a TWAIN session.
When the TWAIN session is no longer needed, it should be end by calling the Shutdown method. For every call to the Startup2 method there must be a call to the Shutdown method. Use this method if you need to specify the language and country in the UI. Note: If this function throws TwainExceptionCode::InvalidDll exception then this is mostly because you have an old version of TWAINDSM.DLL in your system folder, you need to make sure you have at least version 2.0.9.0 of this DLL. You can download it from www.twain.org.
For more information, refer to Initializing a TWAIN Source.
For more information, refer to Freeing the TWAIN Session.
Example
Copy Code  
Imports Leadtools
Imports Leadtools.Twain

Public Sub StartupExample2(ByVal parent As IWin32Window)
   Dim session As TwainSession = New TwainSession()

   Try
      session.Startup2(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None, TwainLanguage.LanguageEnglish, TwainCountry.CountryUsa)
   Catch ex As Exception
      MessageBox.Show(ex.Message)
   End Try

   session.Shutdown()
End Sub
using Leadtools;
using Leadtools.Twain;

public void Startup2Example(IWin32Window parent)
{
   TwainSession session = new TwainSession();

   try
   {
      session.Startup2(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None, TwainLanguage.LanguageEnglish, TwainCountry.CountryUsa);
   }
   catch (Exception ex)
   {
      MessageBox.Show(ex.Message);
   }

   session.Shutdown();
}
Requirements

Target Platforms

See Also

Reference

TwainSession Class
TwainSession Members
Shutdown Method
IsAvailable Method
Acquire Method
SelectSource Method

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.