Nicomsoft OCR: Developer's Guide


Engine_CallFunction


Syntax

C++:NONE
C#:System.Array Engine_CallFunction(string FuncName, object InputVars)
Visual Basic:Function Engine_CallFunction(ByVal FuncName As String, ByVal InputVars As Object) As System.Array
Java:NONE
Delphi:NONE


Description

Calls the specified NSOCR function that cannot be called directly from such scripting languages as VBScript or JScript. Due to the limitations of these languages, they cannot call functions that pass variables by reference. In such cases, you have to use this function. For example, there is no way to call the "Engine_InitializeAdvanced" function from VBScript because this function uses the following parameters by reference: "CfgObj", "OcrObj", and "ImgObj".


Parameters

FuncName [IN] – the OCR function to call.
InputVars [IN] – the array of input variables.


Return value

Returns an array that contains the return code of the OCR function, and then the values returned by the function.


Remarks

1. Do not call this function from non-scripting languages (C/C++, C++ Bulder, C#, VB, VB.NET, Java, or Delphi), which can directly call any NSOCR functions. In general, this function is intended for VBScript and JScript only.
2. Use this function to call only the functions that use parameters by reference, that is, return one or more values via parameter variables. Calling other functions is not supported because you can call them directly. Here is a list of functions that cannot be called directly from scripting languages and must be called via the "Engine_CallFunction" function: Engine_GetVersion, Engine_InitializeAdvanced, Cfg_Create, Cfg_GetOption, Ocr_Create, Img_Create, Img_GetSize, Img_AddBlock, Img_GetBlock, Img_GetImgText, Img_GetPixLine, Img_CalcPointPosition, Blk_GetRect, Blk_GetText, Blk_GetLineText, Blk_GetWordText, Blk_GetCharRect, Blk_GetCharText, Blk_GetTextRect, Svr_Create, Svr_GetText, Scan_Create, Scan_Enumerate.
3. For more details, see "VBScript Sample" and "JScript Sample" in the NSOCR SDK.


Example

None.