Share via


ISpObjectTokenCategory::GetId (Windows Embedded CE 6.0)

1/6/2010

This method gets the category identifier.

Syntax

HRESULT GetId(
  WCHAR** ppszCoMemCategoryId
);

Parameters

  • ppszCoMemCategoryId
    [out] Address of a pointer to a null-terminated string specifying the identifier for the current category. The caller must free the object using CoTaskMemFree when it is no longer needed.

Return Value

The following table shows the possible return values.

Value Description

S_OK

Function completed successfully.

SPERR_UNINITIALIZED

Category interface is not initialized.

E_POINTER

ppszCoMemCategoryId is invalid or bad.

FAILED(hr)

Appropriate error message.

Example

The following snippet gets the category identifier for a data key location type of SPCAT_VOICES.

HRESULT hr;
CComPtr cpSpCategory;
CSpCoTaskMemPtr cpwszOldID;
hr = SpGetCategoryFromId(SPCAT_VOICES, &cpSpCategory);
//Check return code
hr = cpSpCategory->GetId(&cpwszOldID);
//Check return code
CoTaskMemFree(cpwszOldID);

Requirements

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

See Also

Reference

ISpObjectTokenCategory
SAPI Interfaces