Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ITfProperty::SetValue method

Syntax


HRESULT SetValue(
  [in]       TfEditCookie ec,
  [in]       ITfRange     *pRange,
  [inconst VARIANT      *pvarValue
);

Parameters

ec [in]

Contains an edit cookie that identifies the edit context. This is obtained from ITfDocumentMgr::CreateContext or ITfEditSession::DoEditSession.

pRange [in]

Pointer to an ITfRange interface that contains the range that the property value is set for. This parameter cannot be NULL. This method will fail if pRange is empty.

pvarValue [in]

Pointer to a VARIANT structure that contains the new property value. Only values of type VT_I4, VT_UNKNOWN, VT_BSTR and VT_EMPTY are supported.

Return value

This method can return one of these values.

ValueDescription
S_OK

The method was successful.

E_INVALIDARG

One or more parameters are invalid.

E_OUTOFMEMORY

A memory allocation failure occurred.

E_FAIL

An unspecified error occurred.

TF_E_NOLOCK

The edit context identified by ec does not have a read/write lock.

TF_E_READONLY

The edit context is read-only.

TF_E_NOTOWNEDRANGE

The TSF manager does not own the range.

 

Remarks

Property values set with this method will be discarded when the text that the property value covers is modified. To gain custom control over a value response to text edits, use ITfProperty::SetValueStore.

Values set with this method are serialized, except for values of type VT_UNKNOWN, which are not serialized. If a property value of type VT_UNKNOWN must be serialized, use ITfProperty::SetValueStore instead.

Overlapping property values of the same type are unsupported.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Redistributable

TSF 1.0 on Windows 2000 Professional

Header

Msctf.h

IDL

Msctf.idl

DLL

Msctf.dll

See also

ITfProperty
ITfDocumentMgr::CreateContext
ITfEditSession::DoEditSession
ITfProperty::SetValueStore
ITfRange

 

 

Show:
© 2017 Microsoft