Microsoft Speech Platform
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(
LPCWSTR *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. |