IUIAutomationValuePattern::CachedValue Property

Retrieves the cached value of the element.


HRESULT IUIAutomationValuePattern::get_CachedValue(BSTR *retVal);


  • retVal
    The address of a variable that receives a string representation of the cached value.

Return Value

Returns S_OK if successful, or an error value otherwise.


Single-line edit controls support programmatic access to their contents through IUIAutomationValuePattern. However, multiline edit controls do not support this control pattern, and their contents must be retrieved by using IUIAutomationTextPattern.

This property does not support the retrieval of formatting information or substring values. IUIAutomationTextPattern must be used in these scenarios as well.