DTWAIN_SetOCRCapValues

Top  Previous  Next

The DTWAIN_SetOCRCapValues function sets the capability value(s) for an OCR engine.

 

DTWAIN_BOOL DTWAIN_SetOCRCapValues (

DTWAIN_OCRENGINE

Source,

LONG

Capability,

LONG

SetType,

DTWAIN_ARRAY

CapValues );

 

Parameters

Engine

A selected OCR engine.

 

Capability

The capability that is to be set.

 

SetType

Indicates which type of setl to do

 

CapValues

DTWAIN_ARRAY containing the values to set.

 

 

Return Values

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

 

Comments

The DTWAIN_SetOCRCapValues function sets the capabilities of an OCR engine.

 

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 set.  A list of the capabilities as well as the capabilities data type can be found in the topic DTWAIN OCR Capability Constants.

 

The SetType 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 SetType can be one of the following:

 

SetType

Definition

DTWAIN_CAPSET        

Sets the current value of the capability.

DTWAIN_CAPRESET

Sets the capability value back to the default setting.

 

The DTWAIN_ARRAY CapValues must be initialized and filled with the capability's value(s) to set.  If the SetType is DTWAIN_CAPRESET, the capability is set to the default value

 

For the DTWAIN_SetOCRCapValues 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