Question

I have created a Windows Shell Extension using ATL (Visual Studio 2008). It has the following modules and each module is a separate ATL Simple Object with its own .rgs file for registration:-

  1. IShellFolder/IShellView -> For a virtual drive in windows explorer
  2. IContextMenu/IShellExtInit -> For a popup menu files and folders
  3. IShellIconOverlayIdentifier - To display overlay icons on files and folders
  4. IShellPropSheetExt/IShellExtInit -> For a custom property page in File & Folder's properties

The above work fine in WinXP and I am able to debug this shell extension in WinXP. But a soon as I switch to Vista, I only get method calls for (2) and (4). The drive gets created in Windows Explorer but the underlying methods are not called when I click it. Although when I right click I get called for (2) and when I select "Properties" for a file or folder I get into the code for (4).

Is there some interface that I am missing for (1) and (3) on Vista. I could not find full and detailed documentation on writing Shell Extensions for Vista on MSDN. I had already gone through the CodeProject articles on shell extensions.

Was it helpful?

Solution

The problem was because of a Xml SMART Pointer usage. It was has problems when Release() was called on it.

Check this link Internet Explorer crashes when MSXML2::IXMLDOMDocumentPtr -> Release() is called

OTHER TIPS

Make sure that your extensions are handling the initialization properly, otherwise the verclsid.exe won't let your extension getting loaded. verclsid.exe first loads the shell extensions and does a quick check on them before it sends an 'ok' to the shell indicating that it's safe to load the extension.

See here for some details about verclsid.exe.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top