If you read the comments for CRhinoPlugIn::InsertPlugInMenuToRhinoMenu, you will see that the method gets a submenu, from the specified menu, by index. Thus, if you want to remove it, you will have to get the handle to the submenu and pass it to CRhinoPlugIn::RemovePlugInMenuFromRhino. I’ve updated the SampleMenu project to demonstrate how to do this.