다음을 통해 공유


ISpSREngineSite::GetTransitionProperty (Windows CE 5.0)

Send Feedback

This method gets a property (also known as a "semantic tag") for a transition in a CFG. Use of properties allows semantic information to be embedded inside a grammar.

By default, the engine does not see transition properties. The engine just recognizes the speech from the words in the grammar. Then SAPI parses and adds property information in a call to ISpSREngineSite::ParseFromTransitions.

If it needs to, the engine can see the property information by calling this method on any transition. If there is a property on the transition, the property name or identifier and value are retrieved in a structure. The engine needs to free the structure after each use by calling CoTaskMemFree.

Before calling this method, the engine might want to find out if a transition has a property attached. It can do this by looking at the fHasProperty member in the SPTRANSITIONENTRY structure associated with the transition of interest.

HRESULT GetTransitionProperty(  SPTRANSITIONID ID,  SPTRANSITIONPROPERTY** ppCoMemProperty);

Parameters

  • ID
    [in] Transition identifier.
  • ppCoMemProperty
    [out] Address of a pointer to an SPTRANSITIONPROPERTY structure containing the property information. If the transition does not have a property, this parameter retrieves NULL, and the method returns S_FALSE.

Return Values

The following table shows the possible return values.

Value Description
S_OK Function completed successfully and transition has a property.
S_FALSE Function completed successfully but transition does not have a property.
E_INVALIDARG One or more arguments are invalid.
E_OUTOFMEMORY Exceeded available memory.
FAILED(hr) Appropriate error message.

Requirements

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

See Also

ISpSREngineSite | SAPI Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.