✎ NOTE
User words and dictionaries are no longer supported in the LEADTOOLS OCR Module - OmniPage Engine.
#include "ltdoc2.h"
L_LTDOC2_API L_INT EXT_FUNCTION L_Doc2GetUserDictionarySectionItem(hDoc, pSection, pItem, nSize, puMask, bFirst)
Gets section items from the specified section of the User dictionary.
Handle to the OCR document.
Name of the section of the User dictionary whose items are to be listed.
Pointer to a buffer to get the first UNICODE item of the item-list.
Size in bytes, of the buffer in bytes.
Pointer to a variable to hold a value, which indicates which User dictionary to use. Possible values are:
Value | Meaning |
---|---|
DOC2_USER_DICT_LITERAL | [0x0000] Used literal. This is the default value. |
DOC2_USER_DICT_REGULAR_EXPRESSION | [0x0001] Used regular expression |
Flag specifying which item to get. Possible values are:
Value | Meaning |
---|---|
TRUE | Get the first section item in the specified section |
FALSE | Get the next section item in the specified section |
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This function returns the item from the pSection section of the User dictionary.
Before calling this function, you must allocate a buffer with sufficient size to accommodate the current pItem parameter.
Call this function multiple times to get each of the items in a User dictionary section. The first time you call it, pass TRUE for bFirst. In each subsequent call, pass FALSE for bFirst, and LEADTOOLS will get the next item from the specified section. To re-start the process, call this function again, and pass TRUE for bFirst.
Required DLLs and Libraries
For an example, refer to L_Doc2GetUserDictionary.