This topic has not yet been rated - Rate this topic

ITfSource interface

Applies to: desktop apps | Metro style apps

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

Minimum supported server

Windows 2000 Server

Redistributable

TSF 1.0 on Windows 2000 Professional

Header

Msctf.h

IDL

Msctf.idl

DLL

Msctf.dll

 

 

Send comments about this topic to Microsoft

Build date: 2/15/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ