L_OcrEngine_GetWorkDirectory

#include "ltocr.h"

L_LTOCR_API L_INT EXT_FUNCTION L_OcrEngine_GetWorkDirectory(engine, value, count)

L_OcrEngine engine; handle to the OCR engine
L_TCHAR* value; allocated string buffer to hold the engine working directory path
L_UINT count; number of the allocated string buffer elements

Gets the path to the work directory used by this OCR engine to store the engine temporary files.

Parameter Description
engine Handle to the OCR engine.
value Allocated string buffer to hold the engine working directory path, you should allocate enough memory for the this buffer to be filled with the engine's working directory.
count Number of the allocated string buffer elements, this should be _countof(value).

Returns

SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

The work directory is passed as the workDirectory parameter to the L_OcrEngine_Startup method. This directory is used when the engine saves the its temporary files. The OCR engine will create various temporary files during recognition and document saving processes. It will use the path passed in workDirectory as the location where these temporary files will be created. You can pass NULL to let the engine select the temporary directory of the current logged in user (TEMP).

In either case, the value of working directory of the current started OCR engine can be obtained through the L_OcrEngine_GetWorkDirectory method.

The engine will automatically deletes any temporary files created. However, if an unexpected error occurs (for example, an un-handled exception), some temporary files may still reside in the work directory after the application exits. A typical application may use a custom directory inside the application path and manually deletes any files that may reside there before calling L_OcrEngine_Startup in case the previous instance of the application exited abnormally.

Required DLLs and Libraries

LTOCR
For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Help Version 20.0.2018.6.21
Products | Support | Contact Us | Copyright Notices
© 1991-2018 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS OCR Module - LEAD Engine C API Help