Initializes the TWAIN session.
Syntax
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
Example
Visual Basic | Copy Code |
---|
Public Sub StartupExample(ByVal parent As IWin32Window)
Dim session As TwainSession = New TwainSession()
session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None)
Try
session.Startup(parent, "LEAD Technologies, Inc.", "LEAD Twain .NET", "Version 14", "LEADTools Twain test sample", TwainStartupFlags.None)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
session.Shutdown()
End Sub |
C# | Copy Code |
---|
public void StartupExample(IWin32Window parent) { TwainSession session = new TwainSession(); session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None); try { session.Startup(parent, "LEAD Technologies, Inc.", "LEAD Twain .NET", "Version 14", "LEADTools Twain test sample", TwainStartupFlags.None); } catch (Exception ex) { MessageBox.Show(ex.Message); } session.Shutdown(); } |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also