Click to Rate and Give Feedback
MSDN
MSDN Library
SAPI Reference
SAPI Functions
 SpCreateNewToken (By Category ID)
Collapse All/Expand All Collapse All
SpCreateNewToken (By Category ID)
Windows Mobile Not SupportedWindows Embedded CE Supported
8/28/2008

This function creates a token coercively, based on category identifier. The token is created with the specified name, if provided. Otherwise, the function automatically generates a unique name.


inline HRESULT SpCreateNewToken(
  const WCHAR* pszCategoryId,
  const WCHAR* pszTokenKeyName,
  ISpObjectToken** ppToken
);
pszCategoryId

[in] Pointer to a category identifier.

pszTokenKeyName

[in, out] Pointer to the token key name. On input, an optional token key name is provided, or NULL. On output, this parameter points to the provided name with "Tokens" appended before it. If NULL is furnished as an input, the output is a unique token key name generated by the function.

ppToken

[out] Address of a pointer to an object implementing ISpObjectToken. The token is created, if one does not currently exist.

The following table shows the possible return values.

Value Description

S_OK

Function completed successfully.

FAILED(hr)

Appropriate error message.

The following code snippet illustrates the use of SpCreateNewToken (By Category ID) with the SPCAT_RECOPROFILES category identifier.

HRESULT hr = S_OK;
// create a new recognition profile
hr = SpCreateNewToken(SPCAT_RECOPROFILES, NULL, &cpObjectToken);
// Check hr
Headersphelper.h
Librarysapilib.lib
Windows Embedded CEWindows CE .NET 4.1 and later

Reference

SAPI Functions

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker