I have been working on and off with windows shell programming and it is a slog for me making heads or tails of the entire mess. Linking a contextmenu to a namespace extension requires using GetUIObjectOf and IQueryAssociations and passing the right contents to AssocCreateForClasses. And I still cannot figure out how copy/paste works in a NSE. Which got me looking down the trail of IContextMenuCB and the XP era CDefFolderMenu_Create2 and I have found absolutely nothing on that interface.
In the wndows api space on MSDN it is very rare that you see sample code that illustrates the APIs.
The windows desktop forums are not places where you can get good broad answers to a question.