Share via


ISpRecognizer::IsUISupported

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

This method determines if the underlying speech engine implements a certain type of user-interface component. See the "SR Engine Guide" for further information on how an SR Engine implements UI.

Syntax

[local] HRESULT IsUISupported(
  const WCHAR* pszTypeOfUI,
  void* pvExtraData,
  ULONG cbExtraData,
  BOOL* pfSupported
);

Parameters

  • pszTypeOfUI
    [in] Pointer to a null-terminated string specifying information about the type of UI.
  • pvExtraData
    [in] Pointer to additional information for the call. The SR engine implementation dictates the format and use of the data provided.
  • cbExtraData
    [in] Size, in bytes, of the data specified by pvExtraData.
  • pfSupported
    [out] Pointer to a value indicating if the UI is supported. This value is set to TRUE if the UI is supported, and to FALSE otherwise. If this value is TRUE, but the return code is S_FALSE, the specified UI type is supported, but not with the current parameters or run-time environment. Check the engine implementation to verify run-time requirements.

Example

The following code snippet illustrates the use of this method with the user training UI.

HRESULT hr = S_OK;
// ask current recognizer if it supports user training
hr = cpRecognizer->IsUISupported(SPDUI_UserTraining, NULL, NULL, &fSupported);
// Check hr
// if fSupported == TRUE, then current speech recognizer supports user training

Return Value

The following table shows the possible 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

pfSupported is invalid or bad.

FAILED(hr)

Appropriate error message.

Requirements

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

See Also

Reference

ISpRecognizer
SAPI Interfaces