Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, August 1, 2007 9:57:27 AM(UTC)

jraggio  
jraggio

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
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Monday, August 6, 2007 7:23:29 AM(UTC)
Maen Hasan

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
 
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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.057 seconds.