ISpVoice::IsUISupported
ISpVoice::IsUISupported checks if the underlying text-to-speech engine's object token supports the requested UI.
[local] HRESULT IsUISupported(
const WCHAR *pszTypeOfUI,
void *pvExtraData,
ULONG cbExtraData,
BOOL *pfSupported
);
Parameters
- pszTypeOfUI
- [in] Address of the null-terminated string containing the UI type that is being queried.
- pvExtraData
- [in] Pointer to additional information needed for the object. The TTS Engine implementer dictates the format and usage of the data provided.
- cbExtraData
- [in] Size, in bytes, of the ExtraData. The TTS Engine implementer dictates the format and usage of the data provided.
- pfSupported
- [out] Flag specifying whether the specified UI is supported. TRUE indicates the UI is supported, and FALSE indicates the UI is not supported. If this value is TRUE, but the return code is S_FALSE, the UI type (pszTypeOfUI) is supported, but not with the current parameters or run-time environment. Check with the engine implementer to verify run-time requirements.
Return values
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. |
FAILED(hr) | Appropriate error message. |
Remarks
See the TTS Engine White Paper for further information on how a TTS Engine should implement UI.
Example
The following code snippet illustrates the use of ISpVoice::IsUISupported.
// Declare local identifiers:
HRESULT hr = S_OK;
CComPtr<ISpVoice> cpVoice;
BOOL fSupported;
// Display properties UI for the current TTS engine.
hr = cpVoice->IsUISupported(SPDUI_EngineProperties, NULL, NULL, &fSupported;);
if (SUCCEEDED (hr))
{
// if fSupported == TRUE, then current TTS engine supports properties UI.
}