Share via


ISpTokenUI

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

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

This interface provides programmatic management of a UI associated with an object implementing ISpObjectToken.

When To Implement

This interface is implemented if callers of the implementation need to be able to display its UI. For example, an SR Engine (see ISpRecognizer) has a UI for user training (see SPDUI_UserTraining). It might be helpful for an application to be able to display this UI as appropriate.

Methods

The following table shows the methods of the ISpTokenUI interface.

Method Description

DisplayUI

Displays the UI associated with the object token.

IsUISupported

Determines if the specified UI type is supported by the token.

Example

The following code snippet illustrates the use of this interface.

HRESULT hr = S_OK;
// find the preferred multimedia input object token
hr = SpFindBestToken(SPCAT_AUDIOIN, L"Technology=MMSys", NULL, &cpObjectToken);
// Check hr
// get the multimedia object token's UI
hr = cpObjectToken->QueryInterface(&cpTokenUI);
// Check hr

The following code snippet illustrates the creation of an object implementing ISpTokenUI. The user must know the exact CLSID of the intended UI object.

HRESULT hr = S_OK;
// create the Token UI for the UI object CLSID_MY_TOKEN_UI
hr = cpTokenUI.CoCreateInstance(CLSID_MY_TOKEN_UI);
// Check hr

Requirements

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

See Also

Reference

SAPI Interfaces