L_DocGetEngineFormatFriendlyName

#include "ltdoc.h"

L_LTDOC_API L_INT EXT_FUNCTION L_DocGetEngineFormatFriendlyName(hDoc, Format, pszFormatName, pnLength)

L_HDOC hDoc;

/* handle to the OCR document */

FORMAT_TYPE Format;

/* document format type */

L_TCHAR * pszFormatName;

/* document format friendly name  */

L_INT * pnLength;

/* length of the document format friendly name */

Gets the provided document format ID friendly name.

Parameter

Description

hDoc

Handle to the OCR document. This handle is obtained by calling the L_DocStartUp function.

Format

The document format ID to retrieve it's friendly name.

pszFormatName

Pointer to a character string to be updated with the document format friendly name.

pnLength

Pointer to variable to be updated with the length of the document format friendly name character string.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

To use this function:

1.

Call this function passing pszFormatName as NULL to obtain the document format friendly name length in the pnLength parameter.

2.

Allocate a buffer of size (*pnLength).

3.

Call this function with passing the allocated buffer to the pszFormatName parameter to obtain the document format friendly name.

Before calling this function, you must declare a variable as a pointer to a character string. Then, pass the variable in the pszFormatName parameter. This function will update the variable with the document format friendly name character string.

Note: The pnLength parameter should always be passed to represent the allocated format name parameter length; otherwise the function will return ERROR_INV_PARAMETER.

Required DLLs and Libraries

LTDOC

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

See Also

Functions:

L_DocGetSupportedEngineFormats, L_DocFreeEngineFormats, L_DocSaveResultsToFile

Topics:

Recognizing Document Pages, LEAD OMR Overview

Example

For an example, refer to L_DocGetSupportedEngineFormats.