ITfSource interface (msctf.h)

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

Inheritance

The ITfSource interface inherits from the IUnknown interface. ITfSource also has these types of members:

Methods

The ITfSource interface has these methods.

 
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


HRESULT hr;
ITfSource *pSource;

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

ITfContext


HRESULT hr;
ITfSource *pSource;

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

ITfCompartment


HRESULT hr;
ITfSource *pSource;

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

ITfInputProcessorProfiles


HRESULT hr;
ITfSource *pSource;

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

ITfLangBarItem


HRESULT hr;
ITfSource *pSource;

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

Requirements

Requirement Value
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