Expand Minimize

IUIAutomationElement::GetCachedChildren method

Retrieves the cached child elements of this UI Automation element.

Syntax


HRESULT GetCachedChildren(
  [out, retval]  IUIAutomationElementArray **children
);

Parameters

children [out, retval]

Type: IUIAutomationElementArray**

Receives a pointer to a collection of the cached child elements.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The view of the returned collection is determined by the TreeFilter property of the IUIAutomationCacheRequest that was active when this element was obtained.

Children are cached only if the scope of the cache request included TreeScope_Subtree, TreeScope_Children, or TreeScope_Descendants.

If the cache request specified that children were to be cached at this level, but there are no children, the value of this property is 0. However, if no request was made to cache children at this level, an attempt to retrieve the property returns an error.

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista, Windows XP with SP3 and Platform Update for Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008, Windows Server 2003 with SP2 and Platform Update for Windows Server 2008 [desktop apps only]

Header

UIAutomationClient.h (include UIAutomation.h)

IDL

UIAutomationClient.idl

See also

Reference
IUIAutomationElement
GetCachedParent
Conceptual
Obtaining UI Automation Elements
UI Automation Tree Overview

 

 

Community Additions

ADD
Show:
© 2015 Microsoft