FoldersTree_FindItemWithPIDL

HTREEITEM FoldersTree_FindItemWithPIDL(
        HWND hwnd,
        HTREEITEM hStartItem,
        const ITEMIDLIST *pidl,
        HTREEITEM *hItem);

Arguments

[in] HWND hwnd

Handle to the control.

[in] HTREEITEM hStartItem

The handle of the item from which to start search.

[in] const ITEMIDLIST *pidl

The PIDL to find.

[out] HTREEITEM *hItem

Pointer to the variable to receive the handle of the found item.

Description

Searches the descendant (including itself) of the item with handle hStartItem, whose IDL is equal to the one designated by pidl.

This function may insert in the tree a new item associated with the shell object with IDL designated by pidl and items associated with folders containing this object directly or indirectly. (In other words, it inserts new items into the control, as necessary.)

hStartItem must be associated before calling this function.

Return Values

If found returns S_OK, otherwise returns S_FALSE. (In case of an error, it may also return other error codes.)