L_Doc2GetSelectedLanguages

#include "ltdoc2.h"

L_LTDOC2_API L_INT EXT_FUNCTION L_Doc2GetSelectedLanguages(hDoc, ppLangIds, pnLangCount)

Gets the current selected languages.

Parameters

L_HDOC2 hDoc

Handle to the OCR document.

DOC2_LANGIDS ** ppLangIds

Pointer to a DOC2_LANGIDS array to be filled with the current 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.

This function will allocate memory for ppLangIds. To free the ppLangIds parameter, call the L_Doc2FreeLanguages function.

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

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

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT Doc2GetSelectedLanguagesExample(L_HDOC2 hDoc) 
{ 
   L_INT nRet; 
   DOC2_LANGIDS * pLangIds = NULL; 
   L_INT nLangCount = 0; 
 
   nRet = L_Doc2GetSelectedLanguages(hDoc, &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