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

ISpEventSource::SetInterest

ISpEventSource::SetInterest sets the type of events the client is interested in.


Sets the type of events which will invoke a notification and become queued.

HRESULT SetInterest(
   ULONGLONG   ullEventInterest,
   ULONGLONG   ullQueuedInterest
);

Parameters

ullEventInterest
[in] Event ID flags indicating which events should invoke a notification to the event sink that this event source uses. Must be of type SPEVENTENUM.
ullQueuedInterest
[in] Event ID flags indicating which events should be queued. The event flags set here must also be set in dwEventInterest. Must be of type SPEVENTENUM.

Return values

Value Description
S_OK Function completed successfully.
E_INVALIDARG Invalid flags passed in one or more fields.
FAILED(hr) Appropriate error message.

Remarks

If SetInterest is never called, the SR engine defaults to SPEI_RECOGNITION as the only event and queued interest. A TTS engine defaults to zero for both event and queued interest. With either engine, no events will be passed through if both parameters are set to zero.


Note that the SPFEI() macro will be used to convert an event enumeration into the appropriate flags to pass to this method. For example, to receive the SPEI_RECOGNITION and SPEI_HYPOTHESIS events, call this function as follows:


ULONGLONG ullMyEvents = SPFEI(SPEI_RECOGNITION) | SPFEI(SPEI_HYPOTHESIS);
    hr = pEventSource->SetInterest(ullMyEvents, ullMyEvents);

Events specified in ullEventInterest must be a superset of those specified in the ullQueuedInterest. Therefore it is possible to have notifications of events but not actually queue them. This can be useful for polling the GetStatus method, especially for TTS.



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