ISpLexicon::GetGeneration (Windows CE 5.0)

Send Feedback

This method gets the current generation identifier of the user lexicon. This identifier is a relative count of how many times the custom lexicons have changed. It is used to detect the changes in the user lexicon, since each change in the user lexicon (add/remove a word or install/uninstall an application lexicon) increments the generation identifier.

HRESULT GetGeneration(DWORD* pdwGeneration);

Parameters

  • pdwGeneration
    [out] Pointer to the generation identifier.

Return Values

The following table shows the possible return values.

Value Description
S_OK Function completed successfully.
E_POINTER pdwGeneration is not a valid write pointer.
SPERR_UNINITIALIZED Interface is not initialized.
FAILED(hr) Appropriate error message.

Remarks

ISpLexicon::GetGenerationChange and this method can be used when an application wants to determine what it has done to the lexicon over a given period of time (for example, to remove changes it has made due to a user cancel). To do this, the application calls ISpLexicon::GetGeneration before it starts modifying the lexicon and stores the retrieved generation identifier. Later, when the application wants to see what words in the lexicon it has modified, it calls ISpLexicon::GetGenerationChange with the stored identifier. This can only be done for small changes as SPERR_LEX_VERY_OUT_OF_SYNC will be returned once sufficient changes have been made.

Requirements

OS Versions: Windows CE .NET 4.1 and later.
Header: Sapi.h, Sapi.idl.
Link Library: Sapilib.lib.

See Also

ISpLexicon | SAPI Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.