IUIAutomationTextRange::Compare method (uiautomationclient.h)

Retrieves a value that specifies whether this text range has the same endpoints as another text range.

Syntax

HRESULT Compare(
  [in]          IUIAutomationTextRange *range,
  [out, retval] BOOL                   *areSame
);

Parameters

[in] range

Type: IUIAutomationTextRange*

A pointer to the text range to compare with this one.

[out, retval] areSame

Type: BOOL*

Receives TRUE if the text ranges have the same endpoints, or FALSE if they do not.

Return value

Type: HRESULT

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

Remarks

This method compares the endpoints of the two text ranges, not the text in the ranges. The ranges are identical if they share the same endpoints. If two text ranges have different endpoints, they are not identical even if the text in both ranges is exactly the same.

Requirements

Requirement Value
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