ISpObjectTokenCategory::SetId

Microsoft Speech SDK

The Microsoft.com Speech website Microsoft Speech SDK SAPI 5.1

ISpObjectTokenCategory::SetId

ISpObjectTokenCategory::SetId sets the category ID.

This method may be called only once. If called more than once, SPERR_ALREADY_INITIALIZED will return.


HRESULT SetId(
   const WCHAR   *pszCategoryId,
   BOOL           fCreateIfNotExist
);

Parameters

pszCategoryId
[in] The null-terminated string name of category to set. SAPI-defined categories are listed in Token Category IDs.
fCreateIfNotExist
[in] Indicates creating the category if one is not already present. TRUE creates the entry. FALSE does not.

Return values

Value Description
S_OK Function completed successfully.
SPERR_ALREADY_INITIALIZED Category interface is already initialized.
E_INVALIDARG pszCategoryId is invalid or bad.
FAILED(hr) Appropriate error message.