ITfCompartment::GetValue method (msctf.h)

Obtains the data for a compartment.

Syntax

HRESULT GetValue(
  [out] VARIANT *pvarValue
);

Parameters

[out] pvarValue

Pointer to a VARIANT structure that receives the data. This receives VT_EMPTY if the compartment has no value. The caller must free this data when it is no longer required by calling VariantClear.

Return value

This method can return one of these values.

Value Description
S_OK
The method was successful.
S_FALSE
The compartment has no value. pvarValue receives VT_EMPTY.
E_UNEXPECTED
The compartment has been cleared by a call to ITfCompartmentMgr::ClearCompartment.
E_INVALIDARG
pvarValue is invalid.

Remarks

The caller must recognize the supplied data format in order to use the data. The compartment installer must publish the data format to enable other clients to use it.

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

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