#include "ltdoc2.h"

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

Gets the provided language ID friendly name.


L_HDOC2 hDoc

Handle to the OCR document.


The language ID to retrieve it's friendly name.

L_TCHAR * pszLangName

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

L_INT * pnLength

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


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


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.


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

Help Version 21.0.2021.4.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS OCR Module - OmniPage Engine C API Help