ISpObjectTokenCategory::GetDefaultTokenId

Microsoft Speech SDK

The Microsoft.com Speech website Microsoft Speech SDK SAPI 5.1

ISpObjectTokenCategory::GetDefaultTokenId

ISpObjectTokenCategory::GetDefaultTokenId retrieves the default token ID for the category.

HRESULT GetDefaultTokenId(
   const WCHAR   **ppszCoMemTokenId
);

Parameters

ppszCoMemTokenId
[in] The null-terminated string name of the token ID used as the default. Must be released with CoMemTaskFree () when no longer needed.

Return values

Value Description
S_OK Function completed successfully.
SPERR_UNINITIALIZED Data key interface is not initialized.
E_POINTER ppszCoMemTokenId is invalid or bad.
FAILED(hr) Appropriate error message.

Remarks

There is a hierarchy for returning a default token ID value. A default token has an attribute marked as DefaultTokenID. When a token is not explicitly marked as such, SAPI attempts to return the default from the user profile. If none exists there, SAPI returns a specially named token called DefaultdefaultTokenID for the category ID. Default tokens are discussed in Object Tokens and Registry Settings White Paper.