TextRange_GetText function (uiautomationcoreapi.h)
Syntax
HRESULT TextRange_GetText(
[in] HUIATEXTRANGE hobj,
[in] int maxLength,
[out] BSTR *pRetVal
);
Parameters
[in] hobj
Type: HUIATEXTRANGE
A text range object.
[in] maxLength
Type: int
The number of characters to return, beginning with the character at the starting endpoint of the text range.
[out] pRetVal
Type: BSTR*
When this function returns, this parameter contains a pointer to the returned text. This parameter is passed uninitialized.
Return value
Type: HRESULT
Returns S_OK if successful or an error value otherwise.
Remarks
If maxLength is -1, all of the text within the text range is returned. If maxLength is larger than the length of the text range, the returned string contains all of the text in the text range.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | uiautomationcoreapi.h |
Library | Uiautomationcore.lib |
DLL | Uiautomationcore.dll |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for