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.

ITextRangeProvider::CompareEndpoints method

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

Syntax


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

Parameters

endpoint [in]

Type: TextPatternRangeEndpoint

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

targetRange [in]

Type: ITextRangeProvider*

The text range to be compared.

targetEndpoint [in]

Type: TextPatternRangeEndpoint

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

pRetVal [out, retval]

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 | Windows Store apps]

Minimum supported server

Windows Server 2003 [desktop apps | Windows Store apps]

Header

UIAutomationCore.h (include UIAutomation.h)

IDL

UIAutomationCore.idl

See also

Reference
ITextProvider
ITextRangeProvider
Conceptual
UI Automation Providers Overview

 

 

Community Additions

Show:
© 2014 Microsoft. All rights reserved.