Holy cow, I wrote a book!
A customer was having trouble with their shell namespace
When we click the [+] button next to our shell namespace extension
in the folder tree view,
the tree view shows both files and folders,
even though it's supposed to show only folders.
does return the
correct values for
SFGAO_FOLDER (including it
for the folders and omitting it for the non-folders).
What are we doing wrong?
The tree view enumerates the children of a folder by
and passing the SHCONTF_FOLDERS flag
while omitting the SHCONTF_NONFOLDERS flag.
This means that it is only interested in enumerating
Child non-folders should be excluded from the enumeration.
It so happens that the customer's shell namespace extension
was not respecting the SHCONTF_FOLDERS and
it always enumerated all objects regardless of what the
Fixing the enumerator fixed the problem.