IUIAutomationTextRange::CompareEndpoints method

Retrieves a value that specifies whether the start or end endpoint of this text range is the same as the start or end endpoint of another text range.

Syntax


HRESULT CompareEndpoints(
  [in]           TextPatternRangeEndpoint srcEndPoint,
  [in]           IUIAutomationTextRange *range,
  [in]           TextPatternRangeEndpoint targetEndPoint,
  [out, retval]  int *compValue
);

Parameters

srcEndPoint [in]

Type: TextPatternRangeEndpoint

A value indicating whether the start or end endpoint of this text range is to be compared.

range [in]

Type: IUIAutomationTextRange*

A pointer to the text range to compare.

targetEndPoint [in]

Type: TextPatternRangeEndpoint

A value indicating whether the start or end endpoint of range is to be compared.

compValue [out, retval]

Type: int*

Receives a negative value if the caller's endpoint occurs earlier in the text than the target endpoint; 0 if the caller's endpoint is at the same location as the target endpoint; or a positive value if the caller's endpoint occurs later in the text than the target endpoint.

Return value

Type: HRESULT

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

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista, Windows XP with SP3 and Platform Update for Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008, Windows Server 2003 with SP2 and Platform Update for Windows Server 2008 [desktop apps only]

Header

UIAutomationClient.h (include UIAutomation.h)

IDL

UIAutomationClient.idl

See also

IUIAutomationTextRange
UI Automation Support for Textual Content

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.