ISpContainerLexicon::AddLexicon (Windows CE 5.0)
This method adds a lexicon and its type to the lexicon stack. It is mainly used by engines to add private lexicons to their container lexicon objects for consistency of lexicon access.
In the case of an application creating a new application lexicon, calling this method for the new lexicon on the application's container lexicon object will not update the engine's container lexicon object. The correct way to update a container lexicon object is to release it and recreate the object, at which point it re-enumerates all available application lexicons. To guarantee an update of the engine's container lexicon object, the engine must be released and recreated. After this, the engine recreates its container lexicon object.
HRESULT AddLexicon(ISpLexicon* pAddLexicon,DWORD dwFlags);
Parameters
- pAddLexicon
[in] Pointer to ISpLexicon for the lexicon to add. - dwFlags
[in] Flags of type SPLEXICONTYPE indicating the lexicon type. The caller should use exactly one of the types from eLEXTYPE_PRIVATE1 through eLEXTYPE_PRIVATE20.
Return Values
The following table shows the possible return values.
Value | Description |
---|---|
S_OK | Function completed successfully. |
E_INVALIDARG | Either dwFlag is invalid or bad, or the lexicon could not be added. |
SPERR_ALREADY_INITIALIZED | The user or application lexicon was attempted to be added |
E_POINTER | pAddLexicon is invalid or bad. |
E_OUTOFMEMORY | Exceeded available memory. |
FAILED(hr) | Appropriate error message. |
Requirements
OS Versions: Windows CE .NET 4.1 and later.
Header: Sapi.h, Sapi.idl.
Link Library: Sapilib.lib.
See Also
ISpContainerLexicon | SAPI Interfaces
Send Feedback on this topic to the authors