IUIAutomation::GetFocusedElementBuildCache Method

Retrieves the IUIAutomationElement interface for the UI element that has the input focus, prefetches the requested properties and control patterns, and stores the prefetched items in the cache.

Syntax

HRESULT GetFocusedElementBuildCache(      
    IUIAutomationCacheRequest *cacheRequest,
    IUIAutomationElement **element
);

Parameters

  • cacheRequest
    [in] The address of the IUIAutomationCacheRequest interface of the cache request, which 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.

Return Value

Returns S_OK if successful, or an error value otherwise.