DTWAIN_GetOCRLastError

Top  Previous  Next

The DTWAIN_GetOCRLastError function returns the last error that occurred when a page has gone through character recognition using an OCR engine.

 

LONG DTWAIN_GetOCRLastError ( DTWAIN_OCRENGINE Engine );

 

 

Parameters

Engine

Specifies an OCR engine.

 

Return Values

If 0 is returned, no error occurred.  Otherwise a non-zero value denoting the error code.

 

Comments

The DTWAIN_GetOCRLastError returns the last error that occurred when DTWAIN_ExecuteOCR is called.  A return code of 0 means that no error occurred.

 

DTWAIN resets error code to 0 at the start of DTWAIN_ExecuteOCR, or when a page is automatically OCRed during acquiring to text or when creating searchable PDF files.

 

If the error code is < 0, this is a DTWAIN error code for items such as invalid pEngine, invalid DTWAIN session, etc.

 

If the error code is > 0, this error is specific to the OCR engine that is being used (the pEngine parameter).  To get a meaningful error string given an error code > 0, call the DTWAIN_GetOCRErrorString function to get more information on the error.

 

 

TWAIN State Transitions

None

 

Prerequisite Calls

None.

 

See Also

DTWAIN_GetOCRErrorString