You are reading help file online using chmlib.com
|
ISpObjectTokenCategory::GetDataKey gets the data key associated with a specific location.
HRESULT GetDataKey(
SPDATAKEYLOCATION spdkl,
ISpDataKey **ppDataKey
);
Value | Description |
---|---|
S_OK | Function completed successfully. |
SPERR_UNINITIALIZED | Data key interface is not initialized. |
E_POINTER | ppDataKey is invalid or bad. |
FAILED(hr) | Appropriate error message. |
The following code snippet retrieves the data key associated with the local computer registry for SPCAT_VOICES.
HRESULT hr;
CComPtr<ISpObjectTokenCategory> cpSpCategory;
CComPtr<ISpDataKey> cpSpDataKey;
hr = SpGetCategoryFromId(SPCAT_VOICES, &cpSpCategory);
//Check return code
hr = cpSpCategory->GetDataKey(SPDKL_LocalMachine, &cpSpDataKey);
//Check return code
You are reading help file online using chmlib.com
|