Share via


SpGetSubTokenFromToken (Windows Embedded CE 6.0)

1/6/2010

This function creates a subtoken from a token.

Syntax

inline HRESULT SpGetSubTokenFromToken(
  ISpObjectToken* pToken,
  const WCHAR* pszSubKeyName,
  ISpObjectToken** ppToken,
  BOOL fCreateIfNotExist = FALSE
);

Parameters

  • pToken
    [in] Pointer to an object implementing ISpObjectToken. If not present, the token is created if fCreateIfNotExist is TRUE.
  • pszSubKeyName
    [out] Pointer to the name of the subtoken to use.
  • ppToken
    [out] Address of a pointer to another object implementing ISpObjectToken for the newly created subtoken.
  • fCreateIfNotExist
    [in] Optional value indicating if the token is to be created if it does not currently exist. Set this value to TRUE to create the token, and to FALSE otherwise. FALSE is the default.

Return Value

The following table shows the return possible values.

Value Description

S_OK

Function completed successfully.

E_POINTER

At least one of the pointers pToken, pszSubKeyName, or ppToken is invalid or bad.

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