This function invokes a command from a context menu. It issues the command in the extension that added it to the menu.
The extension will usually have at its disposal an abstraction interface from the application that it can use to obtain application-specific information. This will help make the extension more flexible and powerful. If an application abstraction is available, the shell will set it to the site of the extension using IObjectWithSite::SetSite. The extension should implement IObjectWithSite::SetSite.
Thus, when the user chooses a command from the extended menu and the application calls SHInvokeContextMenuCommand,which in turn calls IContextMenu::InvokeCommand, the extension can get a reference to the app abstraction interface by calling IObjectWithSite::GetSite.