InitializeEngine Method of the IEngineLoader Interface

This method is used to get a pointer to the IEngine interface. It provides easy access to online licensing if needed and also allows you to specify some additional parameters during initialization. It takes as an input parameter the Customer Project ID number, which is an alphanumeric string common to all the Developer and Runtime licenses your project uses.

As implemented in the InprocLoader object, the method loads FineReader Engine as an in-process server into the current process. As implemented in the OutprocLoader object, the method loads FineReader Engine as an out-of-process server into a separate process.

Syntax

C++

HRESULT __stdcall InitializeEngine(
  BSTR CustomerProjectID,
  BSTR LicensePath,
  BSTR LicensePassword,
  BSTR FREngineDataFolder,
  BSTR FREngineTempFolder,
  VARIANT_BOOL IsSharedCPUCoresMode,
  IEngine** Engine
);
    

C#

int InitializeEngine(
  string CustomerProjectID,
  string LicensePath,
  string LicensePassword,
  string FREngineDataFolder,
  string FREngineTempFolder,
  bool IsSharedCPUCoresMode,
  ref IEngine Engine
);
    

Visual Basic .NET

Private Declare Function InitializeEngine Lib "FREngine.dll" ( _
  CustomerProjectID As String, _
  LicensePath As String, _
  LicensePassword As String, _
  FREngineDataFolder As String, _
  FREngineTempFolder As String, _
  IsSharedCPUCoresMode As Boolean, _
  ByRef Engine As FREngine.IEngine) _
As Integer
    

Parameters

CustomerProjectID
[in] A string containing Customer Project ID number that matches the necessary license.

Note: During library initialization the list of all available licenses is searched for a Developer or Runtime License corresponding to this Customer Project ID. If no corresponding license is found, an error for the last checked license will occur. However, you may pass 0 for this parameter and select the license later, by calling the IEngine::SetCurrentLicense method before any other library methods.

LicensePath
[in] The full file name of the Online License file. If you do not use an Online License, pass an empty string "" or a Null pointer instead.
LicensePassword
[in] The Online License password. If you do not use an Online License, pass an empty string "" or a Null pointer instead.
FREngineDataFolder
[in] Contains the path to the folder in which ABBYY FineReader Engine should store user-specific data. By default, for automatic installation:
%ProgramData%\ABBYY\SDK\12\FineReader Engine for auxiliary engine data
%ProgramData%\ABBYY\SDK\12\Licenses for license data
If you set the FREngineDataFolder value, all auxiliary information will be written to a new data folder. You may need to change the default value, for example, if the interface language settings for your application must be different from other applications that use FineReader Engine. After changing the default, make sure you have full control permissions on the new data folder.
FREngineTempFolder
[in] Contains the path to the folder for ABBYY FineReader Engine temporary files. By default, it is %TEMP%\ABBYY FineReader Engine 12 folder.
IsSharedCPUCoresMode
[in] Specifies whether the CPU cores should be used in shared mode. There are two modes of CPU cores usage: separate and shared. In separate mode ABBYY FineReader Engine uses no more processes than it is allowed by the license. In shared mode any number of processes can be run, but all these processes will use only the CPU cores specified by the IMultiProcessingParams::SharedCPUCoresMask property.
Result
[out, retval] A pointer to IEngine* pointer variable that receives the interface pointer to the resulting Engine object.

Return values

This method has no specific return values. It returns the standard return values of the ABBYY FineReader Engine functions.

See also

IEngineLoader

ExplicitlyUnload

Different Ways to Load the Engine Object

24.03.2023 8:51:52

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.