Freigeben über


ISpTokenUI (Windows CE 5.0)

Send Feedback

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

OS Versions: Windows CE .NET 4.1 and later.
Header: Sapiddk.h, Sapiddk.idl.
Link Library: Sapilib.lib.

See Also

SAPI Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.