Share via


ISpObjectTokenInit::InitFromDataKey (Windows Embedded CE 6.0)

1/6/2010

This method initializes a token to use a specified data key. Dynamic token enumerators can use this method to create tokens under their token enumerator's token. Once a token is created, the client can create the data key using ISpDataKey::CreateKey. After this the client creates a new object token initialization and then uses InitFromDataKey.

Syntax

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

Parameters

  • pszCategoryId
    [in] Pointer to a null-terminated string specifying the category identifier from which to create the token.
  • pszTokenId
    [in] Pointer to a null-terminated string specifying the token identifier.
  • pDataKey
    [in] Pointer to an implementation of ISpDataKey that specifies the system registry key from which to create the token.

Return Value

The following table shows the possible 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.

Requirements

Header sapi.h, sapi.idl
Library sapilib.lib
Windows Embedded CE Windows CE .NET 4.1 and later

See Also

Reference

ISpObjectTokenInit
SAPI Interfaces