Share via


SpCreateNewTokenEx (By Category ID) (Windows Embedded CE 6.0)

1/6/2010

This function creates a new token using the category identifier and a token name. It subsequently completes the information with the helper function SpSetCommonTokenData.

Syntax

inline HRESULT SpCreateNewTokenEx(
  const WCHAR* pszCategoryId,
  const WCHAR* pszTokenKeyName,
  const CLSID* pclsid,
  const WCHAR* pszLangIndependentName,
  LANGID langid,
  const WCHAR* pszLangDependentName,
  ISpObjectToken** ppToken,
  ISpDataKey** ppDataKeyAttribs
);

Parameters

  • pszCategoryId
    [in] Pointer to a category identifier.
  • pszTokenKeyName
    [in, out] Pointer to a token 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.
  • pclsid
    [in] Pointer to the token identifier (in the form of a CLSID).
  • pszLangIndependentName
    [in] Pointer to the language-independent name of the token.
  • langid
    [in] Language identifier of the word. This value can be zero to indicate that the word can use any defined LANGID value.
  • pszLangDependentName
    [in] Pointer to the language-dependent name of the token.
  • ppToken
    [out] Address of a pointer to an object implementing ISpObjectToken. The token is created if it currently does not exist.
  • ppDataKeyAttribs
    [in, out] Address of a pointer to an object implementing ISpDataKey that contains data attributes for the token. The key is created if it does not currently exist. This value can be NULL if a data key is not needed.

Return Value

The following table shows the possible return values.

Value Description

S_OK

Function completed successfully.

FAILED(hr)

Appropriate error message.

Requirements

Header sphelper.h
Library sapilib.lib
Windows Embedded CE Windows CE .NET 4.1 and later

See Also

Reference

SAPI Functions