I'm trying to resolve an issue that I brought up at the end of the investigation into SHBrowseForFolder and folder shortcut browsing: I cannot figure out how IFolderFilter's member function ShouldShow should work to filter out everything but folders and folder shortcuts.
I haven't found much documentation on this and my current solution doesn't work, please see below:
Here's what I have for the function:
HRESULT STDMETHODCALLTYPE ShouldShow(IShellFolder* sf, LPCITEMIDLIST pidlFolder, LPCITEMIDLIST pidlItem)  
{  
    HRESULT resultCode = S_OK;  
    ULONG attributes = 0UL;  
    if (SUCCEEDED(sf->GetAttributesOf(1, &pidlItem, &attributes)))  
    {  
        if (attributes & SFGAO_FOLDER)  
        {  
            resultCode = S_OK;  // Yes, I see the folders
        }  
        else if (attributes & SFGAO_LINK)  
        {  
            // How do I determine if it is a folder AND let the end-user explore them?
            // I ran the code with the resultCode = S_OK just to see what happens
            // it displays the shortcut folders, but I cannot explore them. When I
            // "expand" them (click on the plus-sign-box), nothing happens.
        }  
    }  
    return resultCode;  
}  
Can anyone tell me what code I need to add to filter out everything but folders and folder shortcuts (and still be able to explore the folder shortcuts)?
Thanks in advance!