Question

I would like to write a shell extensions to completely customize the display of a particular folder, ala the Assembly Cache Viewer (browse to c:\windows\assembly and you will see what I mean). Which COM interfaces are responsible for providing these hooks? My 'viewer' will be written in C#...

Thanks!

Was it helpful?

Solution

Here's an article that should get you on your way:

Extending the Windows shell with namespace extensions allows you to create some custom functionality for Windows Explorer. One common use is to enable Explorer to present a list of items that do not exist in one real folder, but actually reside in a number of places. The view on the folder makes it look like these items are in one place, so managing them becomes easier. This article illustrates the process of creating custom shell namespace extensions using C# and the .NET Framework. [...]

OTHER TIPS

Note that there is controversy about doing explorer extensions in .NET.

Example problem: If you target .NET 2.0, then your extension won't work in any "open file" dialogs shown by .NET 1.1 applications. A process can load only one version of the .NET runtime.

It's not just a matter of your extension not working; you will be injecting a particular version of the .NET runtime into any application that uses file dialogs. That's bad news if the app is an unmanaged application that was planning on loading a COM component targetting a newer version of the .NET runtime, etc.

edit: as explained in the comment, this has now been solved by the .NET 4.0 runtime. Therefore, managed explorer extensions should always target .NET 4.0 or later.

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