Export (0) Print
Expand All

ISpRecoGrammar::LoadCmdFromFile (SAPI 5.3)

Speech API 5.3
Microsoft Speech API 5.3

ISpRecoGrammar::LoadCmdFromFile

ISpRecoGrammar::LoadCmdFromFile loads a SAPI 5 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.

HRESULT LoadCmdFromFile(
    LPCWSTR        *pszFileName,
    SPLOADOPTIONS   Options
);

Parameters

pszFileName
[in, string] The name of the file containing the command and control grammar. SAPI 5 supports loading of compiled and static grammars using URL.
Options
[in] Flag of type SPLOADOPTIONS indicating whether the grammar will be modified dynamically.

Return values

ValueDescription
S_OKFunction completed successfully.
E_INVALIDARGpszFileName is invalid or bad. Alternatively, Options is neither SPLO_STATIC nor SPLO_DYNAMIC.
FAILED(hr)Appropriate error message.
Show:
© 2014 Microsoft