L_Doc2GetLanguageFriendlyName

#include "ltdoc2.h"

L_LTDOC2_API L_INT EXT_FUNCTION L_Doc2GetLanguageFriendlyName(hDoc, LangId, pszLangName, pnLength)

L_HDOC2 hDoc;

/* handle to the OCR document */

DOC2_LANGIDS LangId;

/* language ID */

L_TCHAR * pszLangName;

/* language friendly name */

L_INT * pnLength;

/* length of the language friendly name */

Gets the provided language ID friendly name.

Parameter

Description

hDoc

Handle to the OCR document.

LangId

The language ID to retrieve it's friendly name.

pszLangName

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

pnLength

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

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

To use the L_Doc2GetLanguageFriendlyName function:

1.

Call this function passing pszLangName as NULL to obtain the language 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 pszLangName parameter to obtain the language friendly name.

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

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

Required DLLs and Libraries

LTDOC2

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_Doc2GetSupportedLanguages, L_Doc2GetSelectedLanguages, L_Doc2SelectLanguages, L_Doc2FreeLanguages, L_Doc2SetCharLangsOptions, L_Doc2GetCharLangsOptions, L_Doc2GetDefaultSpellLanguages

Topics:

OCR Functions: Languages

 

Working with Languages

Example

For an example, refer to L_Doc2GetSupportedLanguages.