Nicomsoft OCR: Developer's Guide


Cfg_LoadOptions


Syntax

C++:int Cfg_LoadOptions(HCFG CfgObj, UNICODECHAR* FileName)
C#:int Cfg_LoadOptions(int CfgObj, string FileName)
Visual Basic:Function Cfg_LoadOptions(ByVal CfgObj As Integer, ByVal FileName As String) As Integer
Java:int Cfg_LoadOptions(HCFG CfgObj, String FileName)
Delphi:function Cfg_LoadOptions(CfgObj:HCFG; FileName:PWCHAR):integer


Description

Loads OCR options from the configuration file. Before using any OCR-related functions, you need to create the Config object by calling the Cfg_Create function, and then load the options that will be used during OCR.


Parameters

CfgObj [IN] – the Config object.
FileName [IN] – a Unicode, null-terminated string that contains the full path and filename of the configuration file. If no full path is specified, "Bin_common" directory will be used. See Engine_SetDataDirectory for details.


Return value

Zero if success, otherwise an error code.


Remarks

For more information about the configuration file format, see the OCR Configuration section.


Example

See the code samples for the Engine_Initialize or Cfg_SaveOptions functions.