Note
Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.
Microsoft Speech Platform
ISpObjectTokenInit::InitFromDataKey
ISpObjectTokenInit::SetObjectToken initializes a token to use a specified datakey.
<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>HRESULT InitFromDataKey(</strong> <strong> const WCHAR</strong> *<em>pszCategoryId</em>, <strong> const WCHAR</strong> *<em>pszTokenId</em>, <a runat="server" href="jj127605(v=msdn.10).md"><strong>ISpDataKey</strong></a> *<em>pDataKey</em> <strong>);</strong> </pre>
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.