Share via


ISpObjectTokenCategory (Windows CE 5.0)

Send Feedback

This interface defines an object token category. Each category represents a collection of similar tokens, such as voices, recognizers, and audio input devices. Categories can be created or manipulated with helper functions or methods from this interface. ISpObjectTokenCategory inherits from ISpDataKey.

Each category has a category identifier that is unique and identifies only one type of object token. Available categories are listed in Token Category IDs. Category identifiers are always null-terminated strings.

An application can create an object implementing ISpObjectTokenCategory and then call ISpObjectTokenCategory::SetId to set the category identifier for the object. The application can then enumerate the object tokens associated with the category by using ISpObjectTokenCategory::EnumTokens. The application can change and find the default object token for a category using calls to the methods ISpObjectTokenCategory::SetDefaultTokenId and ISpObjectTokenCategory::GetDefaultTokenId.

When to Implement

SpObjectTokenCategory is the standard class used for categories in SAPI. The category and the list of associated tokens are stored in the registry.

Applications typically create object token categories by directly creating the SpObjectTokenCategory class. If an application is using the category to find an associated token that matches certain attributes, it is often easier to use the helper functions SpEnumTokens or SpFindBestToken.

Methods

The following table shows the methods for the ISpObjectToken interface.

Methods Description
EnumTokens Enumerates the tokens for the category.
GetDataKey Gets the data key associated with a specific location.
GetDefaultTokenId Gets the default token identifier for the category.
GetId Gets the token identifier.
SetDefaultTokenId Sets a specific token identifier as the default for the category.
SetId Sets the category identifier.

Requirements

OS Versions: Windows CE .NET 4.1 and later.
Header: sapi.h, sapi.idl.
Link Library: Sapilib.lib.

See Also

SAPI Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.