The interfaces in this category allow you to be called back when certain events happen on another interface. These callbacks are generally referred to as 'event sinks'.
How to Obtain
QI on ITfThreadMgr, ITfContext, ITfCompartment, ITfInputProcessorProfiles, ITfDocumentMgr, or ITfLangBarItem
QI on ITfThreadMgr or ITfContext
TSF can call your application or text service back when certain events occur. Many event sinks are installed by a two-step process:
You will get back a cookie that you will need to pass back to ITfSource::UnadviseSink() when it's time to detach from the event source (e.g., when the host or target object is about to be destroyed, or the text service is uninitializing).
Your application or text service must implement the target interface; these interfaces are typically implemented on the main object (i.e., the object that implements either ITextStoreACP or ITfTextInputProcessor for applications or text services, respectively).
Some event sources can only have a single sink attached. Attaching an single event sink is similar to installing a regular event sink, except that you QueryInterface() for ITfSourceSingle instead of ITfSource; one then attaches the sink by calling ITfSourceSingle::AdviseSingleSink().
Some event sinks are attached by calling specific methods. The following table describes the installation method for these sinks: