You are reading help file online using chmlib.com
|
ISpTokenUI::IsUISupported determines if the specified UI type is supported by the token.
[local] HRESULT IsUISupported(
const WCHAR *pszTypeOfUI,
void *pvExtraData,
ULONG cbExtraData,
IUnknown *punkObject,
BOOL *pfSupported
);
Value | Description |
---|---|
S_OK | Function completed successfully. |
S_FALSE | The UI is supported but not with the current run-time environment or parameters. |
E_INVALIDARG | One or more parameters are invalid. |
E_POINTER | Invalid or bad pointer. |
FAILED(hr) | Error returned by UI object. |
When asking a token to display a particular piece of UI, the token may require extra functionality that only it understands. Common implementation practice for accessing this functionality is to QueryInterface off of a known IUnknown interface. The caller of ISpTokenUI::IsUISupported can set the punkObject parameter with the necessary IUnknown interface. For example, asking to display Speech Recognition Training UI requires that a specific SR engine be used.
The following code snippet illustrates the use of ISpTokenUI::IsUISupported using SPDUI_AudioProperties.
HRESULT hr = S_OK;
// get the default input audio object token
hr = SpGetDefaultTokenFromCategoryId(SPCAT_AUDIOIN, &cpObjectToken);
// Check hr
// get the object token's UI
hr = cpObjectToken->QueryInterface(&cpTokenUI);
// Check hr
// check if the default audio input object has UI for Properties
hr = cpTokenUI->IsUISupported(SPDUI_AudioProperties, NULL, NULL, NULL, &fSupported);
// Check hr
// if fSupported == TRUE, then default audio input object has UI for Properties
You are reading help file online using chmlib.com
|