Nicomsoft OCR: Developer's Guide


Engine_SetDataDirectory


Syntax

C++:int Engine_SetDataDirectory(UNICODECHAR* DirectoryPath)
C#:int Engine_SetDataDirectory(string DirectoryPath)
Visual Basic:Function Engine_SetDataDirectory(ByVal DirectoryPath As String) As Integer
Java:int Engine_SetDataDirectory(String DirectoryPath)
Delphi:function Engine_SetDataDirectory(DirectoryPath: PWCHAR):integer


Description

Sets the path to the folder with the NSOCR binary files (path to ".dll" files, by default they are placed in "Bin" and "Bin_64" folders), or to the folder with the common data files (".lng", ".dat" files and so on; by default they are placed in "Bin_common" folder). It can be called before calling the Engine_Initialize or Engine_InitializeAdvanced functions only.


Parameters

DirectoryPath [IN] – a Unicode, null-terminated string that contains the full directory path to the NSOCR binary files, or the path to the common data files (relative to the folder with the NSOCR binary files) with "*Bin_common*" prefix. For example, "*Bin_common*..\MyDataFolder" changes common data folder from "Bin_common" to "MyDataFolder".


Return value

Zero if success, otherwise an error code.


Remarks

By default, the folder with "NSOCR.dll" will be used as the directory with binary files (.dll files), common data files that are required for OCR (".lng", ".dat", etc.) will be checked in "..\Bin_common" directory (relative to the folder with "NSOCR.dll").


Example

None.