다음을 통해 공유


ISpRecoGrammar::LoadCmdFromFile (Windows Embedded CE 6.0)

1/6/2010

This method loads a SAPI 5.0 command and control grammar from a file. The file can either be a compiled or uncompiled grammar file. To modify the rules of the grammar after it has been loaded, specify SPLO_DYNAMIC for the Options parameter, otherwise specify the SPLO_STATIC flag.

Syntax

HRESULT LoadCmdFromFile(
  const WCHAR* pszFileName,
  SPLOADOPTIONS Options
);

Parameters

  • pszFileName
    [in] Pointer to the name of the file containing the command and control grammar. SAPI 5.0 supports loading of compiled and static grammars using URL.
  • Options
    [in] Value indicating if the grammar will be modified dynamically. Possible values are defined for the SPLOADOPTIONS enumeration.

Return Value

The following table shows the possible return values.

Value Description

S_OK

Function completed successfully.

E_INVALIDARG

pszFileName is invalid or bad. Alternatively, Options is neither SPLO_STATIC nor SPLO_DYNAMIC.

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

ISpRecoGrammar
SAPI Interfaces