Share via


IUIAutomationTextRange::GetText Method

Returns the plain text of the text range.

Syntax

HRESULT GetText(      
    int maxLength,
    BSTR *text
);

Parameters

  • maxLength
    [in] The maximum length of the string to return, or -1 if no limit is required.
  • text
    [out, retval] The address of a variable that receives a pointer to the string, possibly truncated at the specified maxLength.

Return Value

Returns S_OK if successful, or an error value otherwise.