Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Microsoft Speech API 5.4
ISpLexicon::GetGeneration
ISpLexicon::GetGeneration passes back the generation ID for a word.
Passes back the current generation ID of the user lexicon. It is used to detect the changes in the user lexicon because each change in the user lexicon (add/remove a word or install/uninstall an application lexicon) will increment the generation ID.
HRESULT GetGeneration(
DWORD *pdwGeneration
);
Parameters
- pdwGeneration
The generation ID. This is a relative count of how many times the custom lexicons have changed.
Return values
| Value |
| S_OK |
| E_POINTER |
| SPERR_UNINITIALIZED |
| FAILED(hr) |
Remarks
ISpLexicon::GetGenerationChange and ISpLexicon::GetGeneration can be used when an application wants to determine what it has been done to the lexicon over a given period of time. That is, it can back out of changes it has made due to a user cancel. To do this before it begins modifying the lexicon, the application would call ISpLexicon::GetGeneration and store the generation ID. Later, when the application wants to see what words in the lexicon it has modified, it would call ISpLexicon::GetGenerationChanges with the stored ID. This can only be done for small changes, as SPERR_LEX_VERY_OUT_OF_SYNC will be returned once sufficient changes have been made.