ITfRange::CompareEnd method (msctf.h)
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
[in] ec
Edit cookie obtained from ITfDocumentMgr::CreateContext or ITfEditSession::DoEditSession.
[in] pWith
Pointer to a specified range in which an anchor is to be compared with this range end anchor.
[in] aPos
Enumeration element that indicates which anchor of the specified pWith range to compare with this range end anchor.
Value | Meaning |
---|---|
|
Compare this range end anchor with the specified range start anchor. |
|
Compare this range end anchor with the specified range end anchor. |
[out] plResult
Pointer to the result of the comparison between this range end anchor and the anchor of the specified pWith range.
Return value
This method can return one of these values.
Value | Description |
---|---|
|
The method was successful. |
|
An unspecified error occurred. |
|
One or more parameters are invalid. |
|
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
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 |