Export (0) Print
Expand All

ISpGrammarCompiler::CompileStream (SAPI 5.3)

Speech API 5.3
Microsoft Speech API 5.3

ISpGrammarCompiler::CompileStream

ISpGrammarCompiler::CompileStream loads a SAPI 5 grammar file and produces the binary grammar format. It compiles the grammar file pointed to by pSource stream and writes the output to the pDest stream. It can optionally generate C/C++ header information from the <DEFINE> <ID> tags.


HRESULT CompileStream(
   IStream       *pSource,
   IStream       *pDest,
   IStream       *pHeader,
   IUnknown      *pReserved,
   ISpErrorLog   *pErrorLog,
   DWORD          dwFlags
);

Parameters

pSource
Pointer to the source of the XML grammar text.
pDest
Pointer to the destination stream for the binary grammar.
pHeader
Pointer to the stream to write the C/C++ header information (from the <DEFINE> tags) to (e.g., #define myterm 3).
pReserved
Reserved. Do not use.
pErrorLog
Pointer to the error log receiving the messages.
dwFlags
[in] Not currently used. Must be zero.

Return values

ValueDescription
S_OKFunction completed successfully.
E_INVALIDARGOne of the parameters is bad or invalid.
FAILED (hr)Appropriate error message.
Show:
© 2014 Microsoft