CHMlib Logo 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
CrisisHelper - First Aid in Tough Times of World Economic Crisis


The Microsoft.com Speech website Microsoft Speech SDK

SAPI 5.1

ISpGrammarBuilder::CreateNewState

ISpGrammarBuilder::CreateNewState creates a new state in the same grammar rule as hState.


HRESULT CreateNewState(
   SPSTATEHANDLE   hState,   
   SPSTATEHANDLE  *phState
);

Parameters

hState
[in] Handle to any existing state in the grammar rule.
phState
[out] Address of the state handle for a new state in the same grammar rule.

Return values

Value Description
S_OK Function completed successfully.
E_INVALIDARG The hState is not a valid state handle.
E_POINTER The phState pointer is invalid.
E_OUTOFMEMORY Exceeded available memory.

Example

The following code snippet illustrates the use of CreateNewState.


    HRESULT hr = S_OK;

    SPSTATEHANDLE hInit;
    hr = pGrammarBuilder->GetRule(L"rule1", 1, 0, TRUE, &hInit);

    // CreateNewState using the hInitState
    SPSTATEHANDLE hState;
    hr = pGrammarBuilder->CreateNewState(hInit, &hState);
    // Check hr

    // CreateNewState using hState != hInit
    SPSTATEHANDLE hState2;
    hr = pGrammarBuilder->CreateNewState(hState, &hState2);
    // 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
Partner sites: Logo Design, Simple Anti-Crisis Accounting Software, Voice Search for Web