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

ISpPhrase::GetPhrase

ISpPhrase::GetPhrase retrieves data elements associated with a phrase.


HRESULT GetPhrase(
   SPPHRASE   **ppCoMemPhrase
);

Parameters

ppCoMemPhrase
[out] Address of a pointer to an SPPHRASE data structure receiving the phrase information. May be NULL if no phrase is recognized. If NULL, no memory is allocated for the structure. It is the caller's responsibility to call CoTaskMemFree to free the object; however, the caller does not need to call CoTaskMemFree on each of the elements in SPPHRASE.

Return values

Value Description
S_OK Function completed successfully.
E_POINTER Invalid pointer.
E_OUTOFMEMORY Exceeded available memory.

Returned data includes all elements associated with this phrase.

Example

The following code snippet illustrates the use of ISpRecoResult::GetPhrase as inherited from ISpPhrase to retrieve the recognized text, and display the rule recognized and the phrase.

    HRESULT hr = S_OK;

    // ... obtain a recognition result object from the recognizer...

    // get the recognized phrase object
    hr = cpRecoResult->GetPhrase(&pPhrase);
    // Check hr

    // get the phrase's text
    hr = pPhrase->GetText(SP_GETWHOLEPHRASE, SP_GETWHOLEPHRASE, TRUE, &pwszText, NULL);
    // Check hr

    // display the recognized text and the rule name in a message box
    MessageBoxW(MY_HWND, pwszText, pPhrase->Rule.pszName, MB_OK);


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