Click or drag to resize

EngineInit Method

This method initializes the Engine object.

Namespace:  Kofax.OmniPageCSDK.IproPlus
Assembly:  Kofax.OmniPageCSDK.IproPlus (in Kofax.OmniPageCSDK.IproPlus.dll) Version: 1.0.0.0
Syntax
public void Init(
	[OptionalAttribute] string CompanyName,
	[OptionalAttribute] string ProductName,
	[OptionalAttribute] string OEMLicenseFileName,
	[OptionalAttribute] string OEMLicenseKey
)

Parameters

CompanyName (Optional)
Type: SystemString
ProductName (Optional)
Type: SystemString
OEMLicenseFileName (Optional)
Type: SystemString
OEMLicenseKey (Optional)
Type: SystemString
Remarks

All properties and methods on this object return with an error unless initialization was done. All parameters are optional. The CompanyName and ProductName parameters are string parameters and control the location the SDK uses to create temporary files. Temporary files are created in subdirectories within the application directory of the OS. Subdirectories are specified by these parameters. For example, a full temporary directory on a typical Windows XP system is: <system drive="">:\\Documents and Settings\\<username> \\Application data\\<company name="">\\<product name="">. If the CompanyName or ProductName parameters are not specified, the default values used are "Kofax" and "OmniPageCSDK21". If the folder specified by CompanyName or ProductName does not exist, a trappable error occurs. If the Engine is already initialized and this method is called again, the method returns without taking any action, even if the CompanyName or ProductName parameters were changed since the last call; i.e.: this method performs a one-time initialization.

In case of OEM licensing, there are three methods to complete the licensing process depending on the whether the NLS (Kofax Licensing Service) is used in service mode, side-by-side mode or internal mode.

1. ENGine initialization with OEM license file - NLS in service mode:

mEngine.Init("Company", "Product", "", OEM_CODE);

  • the third parameter is an empty string, because the NLS service finds the OEM file, since it was already stored by NLT in the License Store
  • the fourth parameter is the OEM_CODE (e.g. "123456789012") used when preparing/activating the license for distribution

Please keep in mind that the mEngine.LoadLicenseFile(); method is obsolete. It should not be used at all.

2. ENGine initialization with OEM license file - NLS in side-by-side mode:

mEngine.Init("Company", "Product", LICENSE_FILE, OEM_CODE);

Please keep in mind that the mEngine.LoadLicenseFile(); method is obsolete. It should not be used at all.

Notes:

  • the third parameter is a full path and name of the prepared and packed OEM file (e.g. "D:\\Myprogram\\Kofax OmniPage Capture SDK_21.0.LCXZ")
  • the fourth parameter is the OEM_CODE (e.g. "123456789012") used for preparation of the OEM.LCXZ

3. ENGine initialization with OEM license file - Internal mode:

mEngine.Init("Company", "Product", LICENSE_FILE, OEM_CODE "C");

Please keep in mind that the mEngine.LoadLicenseFile(); method is obsolete. It should not be used at all.

Notes:

  • the third parameter must be a non-Null string containing the filename (e.g. "D:\\Myprogram\\Kofax OmniPage Capture SDK_21.0.LCXZ")
  • the fourth parameter is the OEM_CODE (E.g. "123456789012") concatenated with a capital letter 'C'

Advantages and disadvantages of service mode and side-by-side mode processes:

Service mode

advantages:

  • several OP SDK based products and other Kofax OCR products can use the same instance of the service, so this mode is faster and requires less memory than the side-by-side mode- HTTP communication is performed on a fixed port number: 18018

disadvantages:

  • cannot be used if the end-user company policy is so strict that it prohibits third-party service installation on their runtime machines

Side-by-side mode

advantages:

  • can be used even on machines where company policy prohibits third-party service installation

disadvantages:

  • it needs more time and memory to run than in service mode
  • random HTTP ports are used for communication
See Also