Compartir a través de


ISpObjectTokenCategory::EnumTokens (Windows CE 5.0)

Send Feedback

This method enumerates the tokens for the category by attempting to match specified requirements.

HRESULT EnumTokens(  const WCHAR* pszReqAttribs,  const WCHAR* pszOptAttribs,  IEnumSpObjectTokens** ppEnum);

Parameters

  • pszReqAttribs
    [in] Pointer to required attributes for the token.
  • pszOptAttribs
    [in] Pointer to optional attributes for the token.
  • ppEnum
    [out] Address of a pointer to an IEnumSpObjectTokens object representing an enumerated list of the tokens found. The order in which the tokens are listed is based on the order of the specified attributes.

Return Values

The following table shows the possible return values.

Value Description
S_OK Function completed successfully.
SPERR_UNINITIALIZED Data key interface is not initialized.
E_POINTER At least one of the parameters is invalid or bad.
FAILED(hr) Appropriate error message.

Example

The following code snippet demonstrates getting a complete enumerated token list. Because no specific requirement is given (pszReqAttribs and pszOptAttribs are NULL), all values are returned for SPCAT_VOICES.

CComPtr<ISpObjectTokenCategory> cpSpCategory;
CComPtr<IEnumSpObjectTokens> cpSpEnumTokens;
HRESULT hr;

hr = SpGetCategoryFromId(SPCAT_VOICES, &cpSpCategory);
//Check hr

hr = cpSpCategory->EnumTokens(NULL, NULL, &cpSpEnumTokens);
//Check hr

Requirements

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

See Also

ISpObjectTokenCategory | SAPI Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.