Share via


ISpObjectToken::SetId (Windows Embedded CE 6.0)

1/6/2010

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

Syntax

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 Value

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

Header sapi.h, sapi.idl
Library sapilib.lib
Windows Embedded CE Windows CE .NET 4.1 and later

See Also

Reference

ISpObjectToken
SAPI Interfaces