RecAPI
Functions
KernelAPIS
KernelAPI

Dynamic linking of KernelAPI. This module is supported on: Windows. More...

Functions

RECERR RECAPIKRN  kRecInitS (LPCTSTR pRecPath, LPCTSTR pCompanyName, LPCTSTR pProductName)
  Initializing KernelAPIS.
RECERR RECAPIKRN  kRecQuitS (void)
  Closing KernelAPIS.
RECERR RECAPIKRN  kRecSetLicenseS (LPCTSTR pLicenseFile, LPCTSTR pCode)
  Setting the OEM license information.

Detailed Description

Dynamic linking of KernelAPI. This module is supported on: Windows.

There may be a general problem with DLL's that they must be located on one of some predetermined pathes. It may constrain the distribution of the integrating application. The KernelAPIS module solves this problem.

KernelAPIS is a wrapper on the module KernelAPI, which makes possible to separate the integrating application from the files of the OmniPage CSDK 21 without putting the folder of the CSDK into the environment variable PATH. In fact, this may be one of some little static libraries. Depending on how the release version of the integrating application uses the C run-time libraries, one of the following KernelAPIS static libraries should be linked to the application:

The debug version of the integrating application requires a static library to be linked as follows:

It is a thin interface layer for binding the Engine at run-time. It loads the KernelAPI from a specified path and gets all the entry points of the KernelAPI.DLL (kRecInitS). Unloading also can be controlled by the integrating application (kRecQuitS).


Function Documentation

RECERR RECAPIKRN kRecInitS ( LPCTSTR  pRecPath,
LPCTSTR  pCompanyName,
LPCTSTR  pProductName 
)

Initializing KernelAPIS.

This function initializes the module KernelAPIS, which includes the initialization of KernelAPI. Except for kRecSetLicenseS, the functions of KernelAPI should not be called before initialization. This function allows the integrating application to bind the Engine by enumerating the modules installed in the Engine Binary directory, determining the configuration of the Engine and initializing its modules (i.e. by calling kRecInit from inside).

Parameters:
[in] pRecPath Full path to the Engine Binary directory, i.e. where the Engine files are located. NULL kRecInitS searches Engine files beside the application process EXE. Relative path from the application process EXE where the Engine files are located.
[in] pCompanyName Name of the User's Company. It can be NULL. Default value: OmniPage. It can be used for creating a company-specific working folder for temporary and other files generated by KernelAPI.
[in] pProductName Name of the Product or Application. It can be NULL. Default value: CSDK21. It can be used for creating an application-specific working folder for temporary and other files generated by KernelAPI.
Return values:
RECERR
Note:
This function is an alternative call to the kRecInit function, use one of these for Engine initialization.
To close KernelAPIS and also the Engine, the application has to call the kRecQuitS function.
If the specified directory is invalid, or exists but does not contain the Engine files, an API_INIT_ERR value is returned.
This function DOES NOT initialize the scanning module, its initialization requires a separate kRecScanInit function call.
You can speed up Engine initialization by removing superfluous modules from the Engine Binary directory.
RECERR RECAPIKRN kRecQuitS ( void  )

Closing KernelAPIS.

This function closes the module KernelAPIS, which includes the closing of KernelAPI. This function should be called only when the initialization used by the integrating application calls kRecInitS.

Return values:
RECERR
RECERR RECAPIKRN kRecSetLicenseS ( LPCTSTR  pLicenseFile,
LPCTSTR  pCode 
)

Setting the OEM license information.

The kRecSetLicenseS function sets the OEM license information. In the case of an OEM distribution this function must be called before kRecInitS.
For details see the description of kRecSetLicense