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 : Thursday, April 12, 2012 1:59:57 AM(UTC)
terry.bogard

Groups: Registered
Posts: 18


Hello!
first of all I want to say THANK YOU for all the help that I receveid with this demo in VB6 very helpful to solve and understand more the leadtools API but unfortunately I have a problem that I cannot check on returning code in guide
on the instruction.
I just decompress and run the demo where the Leadtools evals 17.5 enviroinments are installed and I have these several problem listed below.
On
nRet = L_LoadBitmap(Path, LeadBitmap, Len(LeadBitmap), 0, ORDER_BGR, 0, 0)
I get "-10" I really don't know why this happen also because I cannot check it :(
on
nRet = L_Doc2StartUp(hDoc, "C:\LEADTOOLS 17.5\Bin\Common\OcrProfessionalRuntime", False)
I Get "-1220" but there is write in  returning guide that is a WARNING probably becausewe are using the EVALUATION VERSION of the product.
on
nRet = L_Doc2CreateSettingsCollection(hDoc, -1, nSid)
I Get "-261"
nRet = L_Doc2SetActiveSettingsCollection(hDoc, nSid)
I Get "-261"
nRet = L_Doc2SelectLanguages(hDoc, LangId(0), 1)
I Get "-261"
   nRet = L_Doc2AddPage(hDoc, LeadBitmap, 1)
I Get "-261"
nRet = L_Doc2SetActivePage(hDoc, 0)
I Get "-261"
also this "-261" cannot check it too :(
so DEMO is precious but unfortunately not running well :(
please help !!!



 

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 : Thursday, April 12, 2012 5:31:06 AM(UTC)

Ibrahim  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

I think you're referring the VB6 project in this forum post:
http://support.leadtools.com/cs/forums/24675/ShowPost.aspx

Please make sure that all paths (the image and the engine) exist and are correct.
The -10 error code means that the file is not found. Please check that the path of the image is correct and exist.

About the -1220 error code, it's not because of using the evaluation version. This error is caused because the OCR engine is already started without shutting it down. This could happen if you debug inside VB6 but do not reach the end of the program. To solve that, you need to close the Visual Basic environment and re-open it.
 
#3 Posted : Thursday, April 12, 2012 6:07:34 AM(UTC)
terry.bogard

Groups: Registered
Posts: 18


Thank you Ibrahim
thanks for all the support Im at last step.
I need to perform recognizewords I have setting up your visual basic 6.0 project with this 2 structure

'Add from lead team
Private Type RECT
        Left As Long
        Top As Long
        Right As Long
        Bottom As Long
End Type


added by me (probably wrong)

Private Type RECOGWORDS2
    uStructSize As Long
    szWord As String * DOC2_MAX_WORD_SIZE
    rcWordArea As RECT
    nZoneIndex As Long
End Type

added API declaration by me (probably wrong ???)

Private Declare Function L_Doc2GetRecognizedWords Lib "Ltdoc2u.dll" (ByVal hDoc As Long, ByVal nPageIndex As Long, ByRef ppRecogWords As RECOGWORDS2, ByVal uStructSize As Long, ByRef pnWordsCount As Long) As Long

Private Declare Function L_Doc2FreeRecognizedWords Lib "Ltdoc2u.dll" (ByVal hDoc As Long, ByRef ppRecogWords As
RECOGWORDS2)

Dim ResOpts As RESULTOPTIONS2
            Dim pStr As String
            Dim RecWord As RECOGWORDS2
            Dim NumberWords As Long
            Dim x As Integer

nRet = L_Doc2GetRecognizedWords(hDoc, 0, RecWord, Len(RecWord), NumberWords)
            If (nRet = 1) Then
                For x = 0 To NumberWords
                    MsgBox ("The get recognized word is " & pStr)
                    pStr = pStr & RecWord.szWord
                Next
            End If
           
            nRet = L_Doc2FreeRecognizedWords(hDoc, RecWord)

on
nRet = L_Doc2GetRecognizedWords(hDoc, 0, RecWord, Len(RecWord), NumberWords)
I GET "-789" ?????
which is the cause of this ?
does not my structure in visual basic 6.0 not perfectly match with yours in C++ ?

'Mine
Private Type RECOGWORDS2

    uStructSize As Long

    szWord As String * DOC2_MAX_WORD_SIZE

    rcWordArea As RECT

    nZoneIndex As Long

End Type

'Lead Team
typedef struct _tagRecogWords2
{
   L_UINT    uStructSize;
   L_WCHAR   szWord[DOC2_MAX_WORD_SIZE];
   RECT      rcWordArea;
   L_INT     nZoneIndex;
} RECOGWORDS2, * pRECOGWORDS2;

I want to be able to return the word as entire string of the zone that I scan.

Thank you for support !

 
#4 Posted : Sunday, April 15, 2012 7:27:34 AM(UTC)

Ibrahim  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

In the attached ZIP file, you can see the minimum OCR project in VB6 but I included the L_Doc2GetRecognizedWords() function.
File Attachment(s):
VB_175_OCRWithGetRecognizeWord.zip (6kb) downloaded 36 time(s).
 
#5 Posted : Sunday, April 15, 2012 11:39:23 PM(UTC)
terry.bogard

Groups: Registered
Posts: 18


Thanks for your support Ibrahim I'm converting code for use this one ;).

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