다음을 통해 공유


ISpObjectToken::SetId (Windows CE 5.0)

Send Feedback

This method sets the category identifier for an object token. The client can call this method only once.

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

Parameters

  • pszCategoryId
    [in] Pointer to a null-terminated string specifying the category identifier.
  • pszTokenId
    [in] Pointer to a null-terminated string specifying the token identifier.
  • fCreateIfNotExist
    [in] Value indicating if the method is to create the object if it does not already exist. Set this value to TRUE to enable creation, and to FALSE otherwise.

Return Values

The following table shows the possible return values.

Value Description
S_OK Function completed successfully.
SPERR_ALREADY_INITIALIZED Category interface is already initialized.
SPERR_TOKEN_DELETED Key has been deleted.
E_INVALIDARG Either pszCategoryId and, or pszTokenId is invalid or bad.
FAILED(hr) Appropriate error message.

Remarks

Category identifiers appear in the fully qualified form as keys in the following path:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Recognizers

The following list shows the only acceptable registry keys:

  • HKEY_CLASSES_ROOT
  • HKEY_CURRENT_USER
  • HKEY_LOCAL_MACHINE
  • HKEY_CURRENT_CONFIG

Requirements

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

See Also

ISpObjectToken | SAPI Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.