You are reading help file online using chmlib.com
|
ISpObjectTokenCategory::GetId retrieves the category ID.
HRESULT GetId(
WCHAR **ppszCoMemCategoryId
);
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. |
The following code snippet retrieves CategoryId for SPCAT_VOICES.
HRESULT hr;
CComPtr<ISpObjectTokenCategory> cpSpCategory;
CSpCoTaskMemPtr<WCHAR> cpwszOldID;
hr = SpGetCategoryFromId(SPCAT_VOICES, &cpSpCategory);
//Check return code
hr = cpSpCategory->GetId(&cpwszOldID);
//Check return code
CoMemTaskFree(cpwszOldID);
You are reading help file online using chmlib.com
|