LEADTOOLS Support
General
General Questions
Application HANGS After Loading Scanner Template
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, August 1, 2007 9:57:27 AM(UTC)
Groups: Registered
Posts: 10
Environment: XP SP2, VS2005, LeadTools .NET 14.5.0.62, SCSI KODAK DS 3500
I download the latest Twain Driver from kodak website for this scanner
This Code Crash/Hangs here m_TWainSession.LoadTemplateFile
'**************************
If Leadtools.Twain.TwainSession.IsAvailable(Me) Then
m_TWainSession = New TwainSession()
m_TWainSession.Startup(Me, "Company", "suite", "1.0", "Image Tool")
AddHandler m_TWainSession.AcquirePage, AddressOf _twainSession_AcquirePage
m_TWainSession.SelectSource() 'SELECT DS 3500
m_TWainSession.ShowTemplateDlg("c:\temp\test.tpl")
m_TWainSession.LoadTemplateFile("c:\temp\test.tpl") 'HERE
If m_TWainSession.Acquire(TwainUserInterfaceFlags.Show) = Windows.Forms.DialogResult.OK Then
If m_Rasterimg IsNot Nothing Then
m_RasterCodecs.Save(m_Rasterimg, "c:\test.tif", RasterImageFormat.Tif, 0, 1, m_Rasterimg.PageCount, 1, CodecsSavePageMode.Overwrite)
End If
End If
m_TWainSession.Shutdown()
m_TWainSession = Nothing
End If
'***************************
If i select another source from the List it is working with no problems.
can you help me with this problem
Thanks a lot
Jorge
#2
Posted
:
Monday, August 6, 2007 7:23:29 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
Hello,
If you put the following code in your project, what exactly do get in the output debug window?
+----------------------+
Private Sub twnSession_SaveTemplate(ByVal sender As Object, ByVal e As Leadtools.Twain.TwainTemplateEventArgs) Handles twnSession.SaveTemplate
Debug.WriteLine("SaveTemplate: " + e.Capability.Information.Type.ToString())
End Sub
Private Sub twnSession_LoadTemplate(ByVal sender As Object, ByVal e As Leadtools.Twain.TwainTemplateEventArgs) Handles twnSession.LoadTemplate
Debug.WriteLine("LoadTemplate: " + e.Capability.Information.Type.ToString())
End Sub
+----------------------+
Also, do you get any exception when you call the m_TWainSession.LoadTemplateFile method?
Thanks,
Maen Badwan
LEADTOOLS Technical Support
LEADTOOLS Support
General
General Questions
Application HANGS After Loading Scanner Template
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.