L_DocGetStatus

#include "ltdoc.h"

L_LTDOC_API L_INT L_DocGetStatus(hDoc, pStatus, uStructSize)

L_HDOC hDoc;

/* handle to the OCR document */

pSTATUS pStatus;

/* pointer to STATUS structure */

L_UINT uStructSize;

/* size of the structure */

Gets last recognition status.

Parameter

Description

hDoc

Handle to the OCR document.

pStatus

Pointer to a STATUS structure to be updated

uStructSize

Specifies the size of the structure pointed to by pStatus, use sizeof(STATUS) to calculate this value.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Returns information about the accuracy and timing data of the last recognition status.

Call this function after calling L_DocRecognize.

Required DLLs and Libraries

LTDOC

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

L_DocRecognize, L_DocSaveResultsToMemory, L_DocFreeMemoryResults, L_DocSetRecognitionResultOptions, L_DocGetRecognitionResultOptions, L_DocEnumOutputFileFormats, L_DocGetTextFormatInfo, L_DocSaveResultsToFile, L_DocSetSpecialChar, L_DocGetSpecialChar, L_DocGetRecognizedCharacters, L_DocSetRecognizedCharacters, L_DocFreeRecognizedCharacters

Topics:

OCR Functions: Recognition

 

Recognizing Document Pages

Example

 L_INT DocGetStatusExample(L_HDOC hDoc)
{
   L_INT nRet;
   STATUS Status;
   L_TCHAR szBuffer[1024];

   ZeroMemory(&Status, sizeof(STATUS));
   ZeroMemory(szBuffer, sizeof(szBuffer));
   nRet = L_DocGetStatus(hDoc, &Status, sizeof(STATUS));
   if (nRet == SUCCESS)
   {
      wsprintf(szBuffer, TEXT("Recognized Characters = %d\nRecognized Words = %d\nRejected Characters = %d\nRejected Words = %d\n"),
               Status.nRecogChrCount,
               Status.nRecogWordCount,
               Status.nRejectChrCount,
               Status.nRejectWordCount);

      MessageBox(NULL, szBuffer, TEXT("Notice!"), MB_OK);
   }
   else
      return nRet;
   return SUCCESS;
}