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.

ITfReadOnlyProperty::GetValue method

Syntax


HRESULT GetValue(
  [in]   TfEditCookie ec,
  [in]   ITfRange *pRange,
  [out]  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 specifies the range to obtain the property for.

pvarValue [out]

Pointer to a VARIANT value that receives the property value. The data type and contents of this value is defined by the property owner and must be recognized by the caller in order to use this value. The caller must release this data, when it is no longer required, by passing this value to the VariantClear API.

Return value

This method can return one of these values.

ValueDescription
S_OK

The method was successful.

S_FALSE

The range is not covered by the property or the range contains more than one property value. pvarValue receives a VT_EMPTY value.

E_INVALIDARG

One or more parameters are invalid.

E_FAIL

An unspecified error occurred.

TF_E_NOLOCK

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

 

Remarks

If the property has no value over pRange, pRange contains more than one value for the property or the property does not completely cover pRange, pvarValue receives a VT_EMPTY value and the method returns S_FALSE.


COLOR:      RR      GGGGGGGG
TEXT:  this is some colored text
    range-->||<-


COLOR:      RR      GGGGGGGG
TEXT:  this is some colored text
    range-->|    |<-


COLOR:      RR      GGGGGGGG
TEXT:  this is some colored text
    range-->|             |<-

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

ITfReadOnlyProperty
ITfDocumentMgr::CreateContext
ITfEditSession::DoEditSession
ITfRange

 

 

Community Additions

Show:
© 2014 Microsoft