|
| Leading Translation Management System for Translation Agencies, Top Translation Management Software for Freelance Translators, Time Tracking Software, Word Count, Character Count and Line Count Software, Computer Assisted Translation Tool for Easy Word Count, Clipboard Character Count Software, User-Friendly Translation Memory Software, Terminology Management Software, Terminology Management Server, Microsoft Glossary Software, Dictionary of Acronyms, Social Network for Translators and Translation Agencies, Acronyms and Abbreviations Search Engine, Russian Translation Lab, Ukrainian Translation Lab. |
You are reading help file online using chmlib.com
|
Microsoft Speech SDK
SAPI 5.1
ISpRecoGrammar::LoadCmdFromProprietaryGrammar
ISpRecoGrammar::LoadCmdFromProprietaryGrammar loads a proprietary grammar.
HRESULT LoadCmdFromProprietaryGrammar(
REFGUID rguidParam,
const WCHAR *pszStringParam,
const void *pvDataParam,
ULONG cbDataSize,
SPLOADOPTIONS Options
);
Parameters
- rguidParam
- [in] Unique identifier of the grammar. The GUID will be used by the application and the SR engine to uniquely identify the SR engine for verifying support.
- pszStringParam
- [in, string] The null-terminated string command. The string can be used by the application and the SR engine to specify which part of a grammar to utilize.
- pvDataParam
- [in] Additional information for the process. SAPI will handle the marshaling of the data to the SR engine.
- cbDataSize
- [in] The size, in bytes, of pvDataParam. SAPI will handle the marshaling of the data to the SR engine.
- Options
- [in] Flag of type SPLOADOPTIONS indicating whether the file should be loaded statically or dynamically. This value must be SPLO_STATIC.
Return values
Value |
Description |
S_OK |
Function completed successfully. |
E_INVALIDARG |
pszStringParam or pvDataParam is invalid or bad. Alternatively, Options is not SPLO_STATIC. |
FAILED(hr) |
Appropriate error message. |
Remarks
When an application calls ::LoadCmdFromProprietaryGrammar, the currently loaded CFG or proprietary will be unloaded.
Applications should use ::LoadCmdFromProprietaryGrammar when using a proprietary grammar format that the SR engine supports (see ISpSREngine::LoadProprietaryGrammar). If the current SR engine does not support the proprietary grammar format (specified using rguidParam and pszStringParam), the SR engine may return E_NOTIMPL.
Example
HRESULT hr = S_OK;
// create a new grammar object
hr = cpRecoContext->CreateGrammar(GRAM_ID, &cpRecoGrammar);
// Check hr
// load our proprietary grammar
hr = cpRecoGrammar->LoadCmdFromProprietaryGrammar(GUID_MyProprietaryGrammarType, NULL, bGrammarData, ulSizeOfGrammarData, SPLO_STATIC);
// Check hr
You are reading help file online using chmlib.com
|
If you want your help file to be removed or added please send e-mail to chmlibcom@gmail.com