ISpObjectTokenInit::InitFromDataKey

Microsoft Speech SDK

The Microsoft.com Speech website Microsoft Speech SDK SAPI 5.1

ISpObjectTokenInit::InitFromDataKey

ISpObjectTokenInit::SetObjectToken initializes a token to use a specified datakey.

HRESULT InitFromDataKey(
   const WCHAR   *pszCategoryId,
   const WCHAR   *pszTokenId,
   ISpDataKey    *pDataKey
);

Parameters

pszCategoryId
[in] The null-terminated string name of the categoryId from which to create the token.
pszTokenId
[in] The null-terminated string name of the TokenId.
pDataKey
[in] Address of an ISpDataKey interface that specifies the system registry key from which to create the token.

Return values

Value Description
S_OK Function completed successfully.
E_POINTER At least one of the parameters is invalid or bad.
SPERR_ALREADY_INITIALIZED Token is already initialized.
SPERR_TOKEN_DELETED Key has been deleted.
E_OUTOFMEMORY Exceeded available memory.

Remarks

Dynamic token enumerators can use this to create tokens under their token enumerator's token. Once created, this enables ISpDataKey::CreateKey to make a new data key, create a new object token, and then use InitFromDataKey.