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.

ITfRange::CompareEnd method

The ITfRange::CompareEnd method compares the end anchor position of this range of text to an anchor in another range.

Syntax


HRESULT CompareEnd(
  [in]  TfEditCookie ec,
  [in]  ITfRange     *pWith,
  [in]  TfAnchor     aPos,
  [out] LONG         *plResult
);

Parameters

ec [in]

Edit cookie obtained from ITfDocumentMgr::CreateContext or ITfEditSession::DoEditSession.

pWith [in]

Pointer to a specified range in which an anchor is to be compared with this range end anchor.

aPos [in]

Enumeration element that indicates which anchor of the specified pWith range to compare with this range end anchor.

ValueMeaning
TF_ANCHOR_START

Compare this range end anchor with the specified range start anchor.

TF_ANCHOR_END

Compare this range end anchor with the specified range end anchor.

 

plResult [out]

Pointer to the result of the comparison between this range end anchor and the anchor of the specified pWith range.

ValueMeaning
-1

This end anchor is behind the anchor of the specified range (position of this end anchor < position of the anchor of the specified range).

0

This end anchor is at the same position as the anchor of the specified range.

+1

This end anchor is ahead of the anchor of the specified range (position of this end anchor > position of the anchor of the specified range).

 

Return value

This method can return one of these values.

ValueDescription
S_OK

The method was successful.

E_FAIL

An unspecified error occurred.

E_INVALIDARG

One or more parameters are invalid.

TF_E_NOLOCK

The value of the ec parameter is an invalid cookie, or the caller does not have a read-only lock.

 

Remarks

This method will never return 0 unless the two anchors are in a single region. If the caller only requires information about whether the two anchors are positioned at the same location, ITfRange::IsEqualEnd is more efficient.

This method is identical to ITfRange::CompareStart, except that the end anchor of this range is compared to an anchor of another specified 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

ITfRange
Text Stores
ITfDocumentMgr::CreateContext
ITfEditSession::DoEditSession
ITfRange::IsEqualEnd
ITfRange::CompareStart
TfAnchor

 

 

Show:
© 2017 Microsoft