Closed GoogleCodeExporter closed 9 years ago
What Declare statements are you using to access the DLL interface?
Original comment by ben%lidd...@gtempaccount.com
on 6 Oct 2008 at 11:19
Possible the problem is that the TessDLL functions are exported as __cdecl
functions
instead of __stdcall functions which VB6 requires.
Original comment by ben%lidd...@gtempaccount.com
on 6 Oct 2008 at 11:21
Original comment by theraysm...@gmail.com
on 20 May 2010 at 6:50
Personaly I call tesseract.exe from my VB.net Projects using this kind of code :
Imports System.IO
Imports System.Threading
Imports System.Collections.Specialized
Public class myClass
Private ProcessList As New Hashtable
Private Sub Button_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button.Click
Dim croppedFile as String = "C:\image.tif"
Dim OCRProcess As Process = New Process()
OCRProcess.StartInfo.FileName = "C:\tesseract\tesseract.exe"
OCRProcess.StartInfo.Arguments = croppedFile & " " & croppedFile & " -l eng"
OCRProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
OCRProcess.StartInfo.CreateNoWindow = True
OCRProcess.EnableRaisingEvents = True
AddHandler OCRProcess.Exited, AddressOf Me.ProcessExited
OCRProcess.Start()
ProcessList.Add(OCRProcess.Id.ToString, croppedFile & ".txt")
Do While Not OCRProcess.HasExited
Application.DoEvents()
Loop
End Sub
Friend Sub ProcessExited(ByVal sender As Object, ByVal e As System.EventArgs)
Dim Proc As DictionaryEntry
Dim oRead As StreamReader
Dim EntireFile As String = ""
For Each Proc In ProcessList
If (sender.id.ToString = Proc.Key) Then
oRead = File.OpenText(Proc.Value)
EntireFile = oRead.ReadToEnd()
End If
Next
MsgBox(EntireFile)
End Sub
End Class
Original comment by regis.te...@gmail.com
on 17 Nov 2010 at 1:54
Reference to this issue was posted in FAQ
Original comment by zde...@gmail.com
on 2 Jan 2013 at 12:44
Original issue reported on code.google.com by
slch2...@gmail.com
on 16 Jul 2007 at 2:20