ITextRangeProvider::CompareEndpoints method (uiautomationcore.h)

Returns a value that specifies whether two text ranges have identical endpoints.

Syntax

HRESULT CompareEndpoints(
                TextPatternRangeEndpoint endpoint,
  [in]          ITextRangeProvider       *targetRange,
                TextPatternRangeEndpoint targetEndpoint,
  [out, retval] int                      *pRetVal
);

Parameters

endpoint

[in] targetRange

Type: ITextRangeProvider*

The text range to be compared.

targetEndpoint

[out, retval] pRetVal

Type: int*

Receives a value that indicates whether the two text ranges have identical endpoints. This parameter is passed uninitialized.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Returns a negative value if the caller's endpoint occurs earlier in the text than the target endpoint.

Returns zero if the caller's endpoint is at the same location as the target endpoint.

Returns a positive value if the caller's endpoint occurs later in the text than the target endpoint.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps | UWP apps]
Minimum supported server Windows Server 2003 [desktop apps | UWP apps]
Target Platform Windows
Header uiautomationcore.h (include UIAutomation.h)

See also

Conceptual

ITextProvider

ITextRangeProvider

Reference

UI Automation Providers Overview