Prevent duplicate menus being created by explorer
On Vista duplicated Git menu entries are added when you right-click a
folder in the Folders pane.
This is because the Shell calls the handler for the Directory\Background
progid first (with a folder pidl), then calls it again for the other
entries with a data object. So the trick is to check if the Git menu has
already been written.
One way you can do this is by using InsertMenuItem on all menu entries
and adding a unique identifier (your module handle, for example) to the
dwItemData member of the item structure. Then in the QueryContextMenu
function you can check if any menu item has this value and act
accordingly.
[JES: moved hInst back into the Explorer-specific part]
Signed-off-by: johnstevenson <john-stevenson@blueyonder.co.uk>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>