ITfSource interface

The ITfSource interface is implemented by the TSF manager. It is used by applications and text services to install and uninstall advise sinks.

Methods

The ITfSource interface has these methods.

Method Description
ITfSource::AdviseSink ITfSource::AdviseSink method
ITfSource::UnadviseSink ITfSource::UnadviseSink method

Remarks

The TSF manager has different implementations of ITfSource, depending upon how the ITfSource interface is obtained. The difference in the implementations is the types of advise sinks that can be installed with the interface. The different implementations can be obtained from the following objects.

For more information about advise sinks that can be installed by each implementation, see ITfSource::AdviseSink.

Examples

ITfThreadMgr

C++
HRESULT hr;
ITfSource *pSource;

hr = pThreadManager->QueryInterface(IID_ITfSource, (LPVOID*)&pSource); if(SUCCEEDED(hr)) { //Use the ITfSource interface.

pSource->Release();

}

ITfContext

C++
HRESULT hr;
ITfSource *pSource;

hr = pContext->QueryInterface(IID_ITfSource, (LPVOID*)&pSource); if(SUCCEEDED(hr)) { //Use the ITfSource interface.

pSource->Release();

}

ITfCompartment

C++
HRESULT hr;
ITfSource *pSource;

hr = pCompartmentManager->QueryInterface(IID_ITfSource, (LPVOID*)&pSource); if(SUCCEEDED(hr)) { //Use the ITfSource interface.

pSource->Release();

}

ITfInputProcessorProfiles

C++
HRESULT hr;
ITfSource *pSource;

hr = pProfiles->QueryInterface(IID_ITfSource, (LPVOID*)&pSource); if(SUCCEEDED(hr)) { //Use the ITfSource interface.

pSource->Release();

}

ITfLangBarItem

C++
HRESULT hr;
ITfSource *pSource;

hr = pLangBarItem->QueryInterface(IID_ITfSource, (LPVOID*)&pSource); if(SUCCEEDED(hr)) { //Use the ITfSource interface.

pSource->Release();

}

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header msctf.h
Redistributable TSF 1.0 on Windows 2000 Professional