IUIAutomationTextRange::CompareEndpoints method (uiautomationclient.h)

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(
  TextPatternRangeEndpoint srcEndPoint    ,
  IUIAutomationTextRange                  *range,
  TextPatternRangeEndpoint targetEndPoint ,
  int                                     *compValue
);

Parameters

unnamedParam1

Type: TextPatternRangeEndpoint

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

range

Type: IUIAutomationTextRange*

A pointer to the text range to compare.

unnamedParam3

Type: TextPatternRangeEndpoint

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

compValue

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]
Target Platform Windows
Header uiautomationclient.h (include UIAutomation.h)

See also

IUIAutomationTextRange

UI Automation Support for Textual Content