You are reading help file online using chmlib.com
|
ISpRecoGrammar::GetGrammarState retrieves the current state of the recognition grammar.
The default grammar state is SPGS_ENABLED.
See also ISpRecoGrammar::SetGrammarState
HRESULT GetGrammarState(
SPGRAMMARSTATE *peGrammarState
);
Value | Description |
---|---|
S_OK | Function completed successfully. |
E_POINTER | One of the pointers is invalid or bad. |
FAILED(hr) | Appropriate error message. |
The following code snippet illustrates the use of ISpRecoGrammar::GetGrammarState to query the default state of an SpRecoGrammar object.
HRESULT hr = S_OK; // create a new grammar object hr = cpRecoContext->CreateGrammar(GRAM_ID, &cpRecoGrammar); // Check hr // query the default grammar state hr = cpRecoGrammar->GetGrammarState(&grammarState); // Check hr // ASSERT that grammarState == SPGS_ENABLED
You are reading help file online using chmlib.com
|