다음을 통해 공유


SpGetTokenFromId (Windows CE 5.0)

Send Feedback

This function creates an object token corresponding to the specified token identifier. This function assists in locating and creating an object token without having to search or change the registry directly.

inline HRESULT SpGetTokenFromId(const WCHAR* pszTokenId,ISpObjectToken** ppToken,BOOL* fCreateIfNotExist = FALSE);

Parameters

  • pszTokenId
    [in] Pointer to a token identifier.
  • ppToken
    [out] Address of a pointer to an object implementing ISpObjectToken that corresponds to the provided identifier. The token is created with CoCreateInstance and must be manually freed when no longer required.
  • fCreateIfNotExist
    [in] Optional pointer to a value indicating if the object is to be created if it does not currently exist. Set this value to TRUE to create the object, and to FALSE otherwise. FALSE is the default.

Return Values

The following table shows the possible return values.

Value Description
S_OK Function completed successfully.
FAILED(hr) Appropriate error message.

Requirements

OS Versions: Windows CE .NET 4.1 and later.
Header: Sphelper.h.
Link Library: Sapilib.lib.

See Also

SAPI Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.