TextRange_GetText function (uiautomationcoreapi.h)
HRESULT TextRange_GetText(
[in] HUIATEXTRANGE hobj,
[in] int maxLength,
[out] BSTR *pRetVal
);
[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.
Type: HRESULT
Returns S_OK if successful or an error value otherwise.
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.
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 |