ITfCompartment::SetValue method (msctf.h)

Sets the data for a compartment.

Syntax

HRESULT SetValue(
  TfClientId    tid,
  const VARIANT *pvarValue
);

Parameters

tid

Contains a TfClientId value that identifies the client.

pvarValue

Pointer to a VARIANT structure that contains the data to be set. Only VT_I4, VT_UNKNOWN and VT_BSTR data types are allowed.

Return value

This method can return one of these values.

Value Description
S_OK
The method was successful.
E_FAIL
An unspecified error occurred.
E_INVALIDARG
pvarValue is invalid.
E_UNEXPECTED
The compartment was cleared by a call to ITfCompartmentMgr::ClearCompartment, this method was called during a ITfCompartmentEventSink::OnChange notification or only the owner can clear this compartment.

Requirements

   
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

ITfCompartment interface, ITfCompartment::GetValue, ITfCompartmentMgr::ClearCompartment, VariantClear function