Share via


ISpSREngine::LoadProprietaryGrammar

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

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

This method loads a grammar in an engine-specific format. SAPI calls this method to use an application-requested grammar that is not in the standard SAPI CFG format.

The application can supply a format identifier (in the form of a GUID), string data, or binary data, or some combination of these, to describe the grammar. SAPI does nothing with this data apart from correctly marshaling it to the SR engine by calling this method.

Syntax

HRESULT LoadProprietaryGrammar(
  void* pvEngineGrammar,
  REFGUID rguidParam,
  const WCHAR* pszStringParam,
  const void* pvDataParam,
  ULONG ulDataSize,
  SPLOADOPTIONS Options
);

Parameters

  • pvEngineGrammar
    [in] Pointer to the grammar supported by the SR engine. The pointer is retrieved by a prior call to the ISpSREngine::OnCreateGrammar method.
  • rguidParam
    [in] Unique identifier for the proprietary grammar.
  • pszStringParam
    [in] Pointer to a null-terminated string specifying proprietary grammar data.
  • pvDataParam
    [in] Pointer to proprietary grammar image data.
  • ulDataSize
    [in] Size, in bytes, of grammar image data specified by pvDataParam.
  • Options
    [in] A grammar loading option. Possible values are specified for the SPLOADOPTIONS enumeration.

Return Value

The following table shows the possible return values.

Value Description

S_OK

Function completed successfully.

FAILED(hr)

Appropriate error message.

Requirements

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

See Also

Reference

ISpSREngine
SAPI Interfaces