L_Doc2GetSelectedLanguagesExt

#include "ltdoc2.h"

L_LTDOC2_API L_INT L_Doc2GetSelectedLanguagesExt(hDoc, nDocId, ppLangIds, pnLangCount)

Gets the currently selected languages.

Parameters

L_HDOC2 hDoc

Handle to the OCR document.

L_INT nDocId

Document ID created by calling L_Doc2CreateDocument.

DOC2_LANGIDS ** ppLangIds

Pointer to a DOC2_LANGIDS array to be filled with the currently selected languages.

L_INT * pnLangCount

Pointer to an integer to be updated with the number of selected languages in ppLangIds.

Returns

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

Comments

To activate recognized languages, call the L_Doc2SelectLanguages / L_Doc2SelectLanguagesExt function.

L_Doc2GetSelectedLanguagesExt allocates memory for ppLangIds. To free the ppLangIds parameter, call the L_Doc2FreeLanguages function.

To get the character options for the currently activated languages, call the L_Doc2GetCharLangsOptions / L_Doc2GetCharLangsOptionsExt function.

To set the character options for the currently activated languages, call the L_Doc2SetCharLangsOptions / L_Doc2SetCharLangsOptionsExt function.

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT Doc2GetSelectedLanguagesExampleExt(L_HDOC2 hDoc, L_INT nDocId) 
{ 
   L_INT nRet; 
   DOC2_LANGIDS * pLangIds = NULL; 
   L_INT nLangCount = 0; 
 
   nRet = L_Doc2GetSelectedLanguagesExt(hDoc, nDocId, &pLangIds, &nLangCount); 
   if (nRet != SUCCESS) 
      return nRet; 
 
   for (L_INT i=0; i<nLangCount; i++) 
   { 
      if (pLangIds[i] == DOC2_LANG_ID_ENGLISH) 
         MessageBox(NULL, TEXT("English is the active language."), TEXT("Notice!"), MB_OK); 
   } 
 
   nRet = L_Doc2FreeLanguages (hDoc, &pLangIds); 
   return nRet; 
} 
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