Tuesday 8 January 2008

Windows Key + E stops working

I use the Windows Key + E all the time to launch explorer, so when it stopped working I was rather miffed. Much searching found little advice except registry settings to turn off/on short cut keys, and advice on uninstalling certain software the used shell extention Context Menus. Seeing as I had just written a shell extention context menu, this seemed like a pretty likely cause. Eventually I found a forum where users of Portfolio (by Extensis) had the problem, Extensis had recommended uninstalling the menu component, however one of their developers had added a note that he had fixed the problem. I emailed him and he replied (despite being on holiday an the time).

If you are writting shell extention context menus you will use the IContextMenu interface. MSDN says:
'InvokeCommand returns S_OK if the command was successfully invoked or an appropriate error message if it was not.'

What is does not say is that if your implementation of InvokeCommand is not handling the particular menu item requested it MUST return E_FAIL (0x80004005) otherwise further menu item handling is not called.

Many thanks to Dan Brewer from Extensis for his help with this

No comments: