DTWAIN_GetOCRCapValues

Top  Previous  Next

The DTWAIN_GetOCRCapValues function gets the capability value(s) for an OCR engine.

 

DTWAIN_BOOL DTWAIN_GetOCRCapValues (

DTWAIN_OCRENGINE

Engine,

LONG

Capability,

LONG

GetType,

LPDTWAIN_ARRAY

pCapValues );

 

Parameters

Engine

A selected OCR engine.

 

Capability

The capability that is to be retrieved.

 

GetType

Indicates which type of retrieval to do

 

pCapValues

Address of a DTWAIN_ARRAY containing the values retrieved.

 

 

Return Values

The return value is TRUE if successful.  Otherwise FALSE is returned.

 

Comments

The DTWAIN_GetOCRCapValues function gets am OCR engine's capability setting.  On successful return, the values for the capability are stored in the DTWAIN_ARRAY located at the address pCapValues.

 

The OCR Engine Engine must be selected using one of the OCR Engine Selection Functions. The capability Capability is the engine's capability that is to be retrieved.  A list of the capabilities as well as the capabilities data type can be found in the topic DTWAIN OCR Capability Constants.

 

The GetType determines whether the capability value that will be retrieved is the current value, default value, or all the values supported by the capability. The values of GetType can be one of the following:

 

SetType

Definition

DTWAIN_CAPGET        

Gets the value(s) of the capability.

DTWAIN_CAPGETCURRENT

Gets the current value of the capability.

DTWAIN_CAPGETDEFAULT

Gets the default value of the capability.

 

The DTWAIN_ARRAY located at address pCapValues will be initialized and filled with the returned capability values.  The DTWAIN_ARRAY does not have to be initialized created with DTWAIN_ArrayCreate. If the DTWAIN_ARRAY located at pCapValues has been created and contains values prior to calling DTWAIN_GetOCRCapValues, the elements will be destroyed.

 

For the DTWAIN_GetOCRCapValues function to return TRUE, the following must take place:

 

The Engine must be opened.

The Engine supports the capability.

 

The DTWAIN_IsOCRCapSupported function can be used to test if the capability is supported.

 

DTWAIN_SysInitialize

DTWAIN_InitOCRInterface

OCR Engine Selection Function