Thread Manager

The thread manager is the base component of the TSF manager. The thread manager performs common tasks related to both applications and text services (clients). These tasks include, but are not limited to, the activation and deactivation of TSF text services, the creation of document managers, and maintenance of the proper relationship between documents and the input focus. The thread manager is defined by the ITfThreadMgr interface.

The majority of the interfaces and objects provided by the TSF manager can be obtained using the methods that the thread manager interface provides.


An application creates a thread manager object by calling CoCreateInstance with CLSID_TFThreadMgr.

Text Services

A text service obtains a thread manager object in the text service ITfTextInputProcessor::Activate method.

Event Notifications

The thread manager also provides event notification to clients. In TSF, event notifications are provided by means of an event sink, which is a COM object. To receive notifications from the thread manager, a client implements an ITfThreadMgrEventSink object and installs the event sink. The event sink is installed by querying the thread manager for IID_ITfSource and calling ITfSource::AdviseSink with IID_ITfThreadMgrEventSink.

Related topics