| LEADTOOLS OCR C DLL Help > Function References > OCR Professional > L_Doc2GetSelectedLanguages |
#include "ltdoc2.h"
L_LTDOC2_API L_INT EXT_FUNCTION L_Doc2GetSelectedLanguages(hDoc, ppLangIds, pnLangCount)
|
L_HDOC2 hDoc; |
/* handle to the OCR document */ |
|
DOC2_LANGIDS ** ppLangIds; |
/* pointer to an array to be updated */ |
|
L_INT * pnLangCount; |
/* pointer to a variable to be updated */ |
Gets the current selected languages.
|
Parameter |
Description |
|
hDoc |
Handle to the OCR document. |
|
ppLangIds |
Pointer to a DOC2_LANGIDS array to be filled with the current selected languages. |
|
pnLangCount |
Pointer to an integer to be updated with the number of selected languages in ppLangIds. |
Returns
|
SUCCESS |
The function was successful. |
|
< 1 |
An error occurred. Refer to Return Codes. |
Comments
Retrieves the current language selection.
To activate recognized languages, call the L_Doc2SelectLanguages 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 function.
To set the character options for the current activated languages, call the L_Doc2SetCharLangsOptions function.
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
Example
L_LTDOC2TEX_API 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;
}