Retrieves one or more UI Automation nodes that match the search criteria.
HRESULT UiaFind( HUIANODE hnode, FindParams* pParams, UiaCacheRequest *pRequest, SAFEARRAY **ppRequestedData, SAFEARRAY **ppOffsets, SAFEARRAY **ppTreeStructures );
- [in] The node to use as starting-point of the search.
- [in] The address of a UiaFindParams structure that contains the search parameters.
- [in] The address of a UiaCacheRequest structure that specifies what information is to be cached.
- [out] The address of a variable that recieves a pointer to a SAFEARRAY containing the requested data. This parameter is passed uninitialized. See Remarks.
- [out] The address of a variable that recieves a pointer to a SAFEARRAY containing the indexes to the requested data array for where the element subtree starts. This parameter is passed uninitialized.
- [out] The address of a variable that recieves a pointer to a SAFEARRAY containing the description of the tree structure. This parameter is passed uninitialized. See Remarks.
Returns S_OK if successful or an error value otherwise.
The tree structure is described by a string where every character is either "p" or ")". The first character in the string always represents the root node. The string is NULL if no elements are returned by the function.
A "p" represents a node (UI Automation element). When one "p" directly follows another, the second node is a child of the first. A ")" represents a step back up the tree. For example, "pp)p" represents a node followed by two child nodes that are siblings of one another. In "pp))p", the last node is a sibling of the first one.
Stock Implementation uiautomationcore.dll Custom Implementation No Header uiautomationcoreapi.h Import library uiautomationcore.lib Minimum operating systems Windows XP