Sets the desired TWAIN version with which to work.
public static void SetVersion(
Leadtools.Twain.TwainVersion twainVersion
)
Public Shared Sub SetVersion( _
ByVal twainVersion As Leadtools.Twain.TwainVersion _
)
public:
static void SetVersion(
Leadtools.Twain.TwainVersion twainVersion
)
twainVersion
The TWAIN version to set. See TwainVersion for a list of available versions.
This method overrides the default TWAIN (version 2) used for scanning. This allows the TWAIN version to be changed without having to rename or delete any of the TWAIN version DLLs from the system directory. The TWAIN version 1 DLL name is Twain_32.dll and the version 2 DLL name is TWAINDSM.DLL. If this method is not called the engine will keep the default behavior and look for TWAIN version 2 first. If version 2 does not exist it will then look for TWAIN version 1. If this method is called and returns SUCCESS there is no need to call Leadtools.Twain.TwainSession.IsAvailable since this internally calls it. For more information, refer to Setting Which TWAIN SpecificationVersion to Use.
Imports Leadtools
Imports Leadtools.Twain
Public Sub SetVersionExample(parent As IntPtr, twainVersion As TwainVersion)
Dim session As New TwainSession()
Try
TwainSession.SetVersion(twainVersion)
session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
session.Shutdown()
End Sub
using Leadtools;
using Leadtools.Twain;
public void SetVersionExample(IntPtr parent, TwainVersion twainVersion)
{
TwainSession session = new TwainSession();
try
{
TwainSession.SetVersion(twainVersion);
session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
session.Shutdown();
}
Products |
Support |
Feedback: SetVersion Method - Leadtools.Twain |
Introduction |
Help Version 19.0.2017.3.22
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.