ITextRangeProvider::CompareEndpoints method

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

Syntax

HRESULT CompareEndpoints(
  TextPatternRangeEndpoint endpoint       ,
  ITextRangeProvider                      *targetRange,
  TextPatternRangeEndpoint targetEndpoint ,
  int                                     *pRetVal
);

Parameters

arg1

Type: TextPatternRangeEndpoint

The endpoint (starting or ending) of the caller's text range.

targetRange

Type: ITextRangeProvider*

The text range to be compared.

arg3

Type: TextPatternRangeEndpoint

The endpoint (starting or ending) of the target text range.

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

   
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