ITfCleanupContextSink::OnCleanupContext method (msctf.h)

Called during a context cleanup operation.

Syntax

HRESULT OnCleanupContext(
  [in] TfEditCookie ecWrite,
  [in] ITfContext   *pic
);

Parameters

[in] ecWrite

Contains a TfEditCookie value that identifies the edit context cleaned up. The edit context is guaranteed to have a read/write lock.

[in] pic

Pointer to an ITfContext interface that represents the context cleaned up.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

A context cleanup occurs when:

  • The text service is deactivated while a context is still on the context stack. This can occur when the active text service is changed or when the active language changes while the text service is active.
  • ITfThreadMgr::Deactivate is called while a context is still on the context stack.

ITfCleanupContextDurationSink::OnStartCleanupContext is called just before the TSF manager begins making ITfCleanupContextSink::OnCleanupContext notifications. When all of the OnCleanupContext notifications complete, the TSF manager calls OnEndCleanupContext.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header msctf.h
DLL Imekrcic.dll
Redistributable TSF 1.0 on Windows 2000 Professional

See also

ITfCleanupContextSink interface, ITfContext interface, TfEditCookie