ContextMenuDemo
demonstration of IContextMenu.
Why use IContextMenu instead of IExecuteCommand? IMO mostly to afford control over the menu, like multiple items, disabling/enabling, custom drawing etc..
Getting started
The meat of the shell extension is in the DisplayNamesCtxMenuShellExt.* files. The rest is just ATL boilerplate stuff.