DTWAIN_SelectOCREngine

Top  Previous  Next

The DTWAIN_SelectOCREngine function allows the user to select an OCR engine from a list of supported OCR Engines.

 

DTWAIN_OCRENGINE  DTWAIN_SelectOCREngine( );

 

Parameters

None.

 

Return Values

If successful, the return value is a non-zero DTWAIN_OCRENGINE handle.  Otherwise NULL is returned.

 

Comments

The DTWAIN_SelectOCREngine function displays the DTWAIN Select OCR Engine dialog box and returns a handle to the selected OCR Engine.   If the user chooses 'Cancel' from the dialog, DTWAIN_SelectOCREngine returns NULL.

 

To determine if a NULL return value from DTWAIN_SelectOCREngine is due to the user cancelling the dialog or if there is another error, call DTWAIN_GetLastError and check if the value is non-zero (which means an error occurred).  If DTWAIN_GetLastError returned 0, this means that the user canceled the dialog, which is perfectly valid for the user to do.

 

The DTWAIN_OCRENGINE return value is used for any other DTWAIN function that requires an OCR Engine handle.

 

Prerequisite Calls

DTWAIN_SysInitialize

DTWAIN_InitOCRInterface

 

Optional Prerequisite Calls

None.