Share via


ISpLexicon::GetGeneration (Windows Embedded CE 6.0)

1/6/2010

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.

Syntax

HRESULT GetGeneration(
  DWORD* pdwGeneration
);

Parameters

  • pdwGeneration
    [out] Pointer to the generation identifier.

Return Value

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

Header sapi.h, sapi.idl
Library sapilib.lib
Windows Embedded CE Windows CE .NET 4.1 and later

See Also

Reference

ISpLexicon
SAPI Interfaces