Helper SpGetTokenFromId (SAPI 5.3)

Microsoft Speech API 5.3

SpGetTokenFromId

SpGetTokenFromId creates an object token of CLSID_SpObjectToken. This function assists in locating and creating an object token without having to search or change the registry directly.

Found in: sphelper.h

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

Parameters

  • pszTokenId
    [in] The null-terminated string indicating the token ID.
  • ppToken
    [out] The token being created. It is created with CoCreateInstance and must be manually freed when no longer required.
  • fCreateIfNotExist
    [in] An optional parameter allowing the object to be created if one does not currently exist. The default is FALSE unless otherwise specified.

Return values

Value
S_OK
FAILED (hr)