I am implementing a Basic Folder object to expand a namespace consisting of folders and subfolders (a junction is a file system folder that is empty). I have implemented IShellFolder
and support returning IContextMenu
to ShellFolderImpl::GetUIObjectOf
.
Suppose I have the following folders (where A and A \ B are the "virtual" folders created by IShellFolder::EnumObjects
)
C:\test.{74660590-4BEF-4BF4-9C85-5FAE0E084926} C:\test.{74660590-4BEF-4BF4-9C85-5FAE0E084926}\A C:\test.{74660590-4BEF-4BF4-9C85-5FAE0E084926}\A\B
I can open C:\test.{74660590-4BEF-4BF4-9C85-5FAE0E084926}
and it lists folder A. When I double-click (or select Open from the context menu) in folder A, this folder opens and in the view subfolder B is displayed.
Problem: this only works for folders directly under C:\test.{74660590-4BEF-4BF4-9C85-5FAE0E084926}
. The context menu is not displayed for subfolder B (and GetUIObjectOf
never called even if IShellFolder:Initialize
is called with the correct PIDL).
In the corresponding part of IContextMenu::InvokeCommand
I will open the subfolder by doing
SHELLEXECUTEINFO sei = { 0 }; sei.cbSize = sizeof(sei); sei.fMask = SEE_MASK_IDLIST | SEE_MASK_CLASSNAME; sei.lpIDList = pidl;
source share