Nicomsoft OCR: Developer's Guide


Cfg_SetOption


Syntax

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


Description

Sets a new value for the specified OCR option. For more details, see the NSOCR Configuration section.


Parameters

CfgObj [IN] – the Config object.
BlockType [IN] – the block type that defines which top-level configuration section will be used to save the option. Use the BT_DEFAULT constant to write to the default section. See the Blk_SetType function for details about block types.
OptionPath [IN] – a Unicode, null-terminated string that contains the full path and name of the OCR option.
OptionValue [IN] – a Unicode, null-terminated string that contains the new value of the specified OCR option.


Return value

Zero if success, otherwise an error code.


Remarks

None.


Example

See the sample code for the Cfg_SaveOptions function.