IUIAutomation::ElementFromIAccessibleBuildCache Method
Retrieves a UI Automation element for the specified accessible object from a Microsoft Active Accessibility server, prefetches the requested properties and control patterns, and stores the prefetched items in the cache.
Syntax
HRESULT ElementFromIAccessibleBuildCache( IAccessible *accessible, int childId, IUIAutomationCacheRequest **cacheRequest, IUIAutomationElement **element );
Parameters
- accessible
[in] The address of the IAccessible interface of the accessible object.- childId
[in] The child ID of the accessible object.- cacheRequest
[in] The address of the IUIAutomationCacheRequest interface representing the cache request that specifies the properties and control patterns to store in the cache.- element
[out, retval] The address of a variable that receives a pointer to the IUIAutomationElement interface of the UI Automation element.
Return Value
Returns S_OK if successful, or an error value otherwise.
Remarks
This method enables UI Automation clients to get IUIAutomationElement interfaces for accessible objects implemented by a Microsoft Active Accessiblity server. This method may fail if the server implements UI Automation provider interfaces alongside Microsoft Active Accessibility support. The method returns E_INVALIDARG if the client passes an OLEACC or UIA-to-MSAA Bridge object in the accessible and childId parameters.
See Also