ISpGramCompBackend::SetSaveObjects

Microsoft Speech SDK

The Microsoft.com Speech website Microsoft Speech SDK SAPI 5.1

ISpGramCompBackend::SetSaveObjects

ISpGramCompBackend::SetSaveObjects sets the storage location of the binary grammar.

HRESULT SetSaveObjects(
   IStream      *pStream,
   ISpErrorLog  *pErrorLog
);

Parameters

pStream
Address of the IStream that receives the binary grammar.
pErrorLog
Address of the ISpErrorLog interface that receives the error information.

Return values

Value Description
S_OK Function completed successfully.
E_INVALIDARG Either pStream or pErrorLog is bad or invalid.
FAILED(hr) Appropriate error message.

Remarks

When ISpGrammarBuilder::Commit is called, the grammar compiler back end writes the binary grammar to the location of pStream. When calling the SetSaveObjects method multiple times, the last call made before calling Commit, receives the binary grammar.