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.

Members

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

Methods

The ITfSource interface has these methods.

MethodDescription
AdviseSink

Installs an advise sink.

UnadviseSink

Uninstalls an advise sink.

 

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

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Redistributable

TSF 1.0 on Windows 2000 Professional

Header

Msctf.h

IDL

Msctf.idl

DLL

Msctf.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.