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.
The ITfSource interface inherits from the IUnknown interface. ITfSource also has these types of members:
The ITfSource interface has these methods.
ITfSource::AdviseSink ITfSource::AdviseSink method |
ITfSource::UnadviseSink ITfSource::UnadviseSink method |
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.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();
}
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 |