ITfContextOwnerCompositionServices::TerminateComposition method (msctf.h)

Terminates a composition.

Syntax

HRESULT TerminateComposition(
  [in] ITfCompositionView *pComposition
);

Parameters

[in] pComposition

Pointer to a ITfCompositionView interface that represents the composition to terminate. If this value is NULL, all compositions in the context are terminated.

Return value

This method can return one of these values.

Value Description
S_OK
The method was successful.
TF_E_DISCONNECTED
The context is not on a document stack.
TF_E_NOLOCK
A text service currently holds a lock on the document.
E_UNEXPECTED
This method was called during another composition operation.
E_FAIL
An unspecified error occurred.

Remarks

A text service uses ITfComposition::EndComposition to terminate a composition that it created.

If the context owner implements the text store, the context owner must be able to grant a synchronous write lock before calling this method.

This method also does the following:

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
DLL Msctf.dll
Redistributable TSF 1.0 on Windows 2000 Professional

See also

ITfComposition::EndComposition, nf-msctf-itfcompositionsink-oncompositionterminated, ITfCompositionView interface, ITfContextOwnerCompositionServices interface, ITfContextOwnerCompositionSink::OnEndComposition