You only need to use this function if you have a grammar in the speech port with same name as a grammar in the global space, and you wish to activate the global grammar.
int ActivateGlobalGrammar(const char* gram_name);
gram_name
The identifier for the grammar being activated. This is the same identifier that was given to the grammar when it was loaded.
LV_SUCCESS
No errors; this grammar is now active.
LV_FAILURE
This grammar could not be activated, because it was not found in the application-level set of grammars.
Since ActivateGrammar searches the speech port's loaded grammars, and then searches the application level grammars, you only need to use ActivateGlobalGrammar if there is a name conflict between your local and app-level grammars, and you need to activate the app-level one.
Detailed error and warning messages are sent to the speech port's logging callback function at priorities 0 and 1, respectively.
LVSpeechPort::ActivateGrammar functions
DeactivateGrammar functions
LV_SRE_ActivateGlobalGrammar (CAPI)
Complete Help Topic List | Speech Engine Product Information