Shell Extensions

Document created by resplin Employee on Jun 6, 2015
Version 1Show Document
  • View in full screen mode

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com



Windows Integration


Extending Windows Explorer with a Shell Extension


A shell extension is a COM dll that implements a number of known interfaces.  By implementing these interfaces and registering the extension in the appopriate manner the functionality of Windows Explorer can be extended.  Follow the links at the bottom of the page for detailed technical information.

What can you do with a shell extension?


  • Add columns to the Explorer browse view.
  • Add/Modify property dialogs.
  • Add custom actions to dialog menus.
  • Change the context menu behaviour.

How is a shell extension implemented?


  • Shell extensions are generally implemented in VC++ using ATL.
  • It is possible to implement shell extensions in C# using .NET->COM bridging techniques.

Problems using C#


  • Stability - if you're messing with explorer then the extension you produce MUST be stable.  .NET is not known for its stability.
  • Installation - a .NET extension will require the .NET runtime to be installed on the client machine.  A large download and installation for a potentialy small extension dll.
  • Memory - every time you open explorer and the extension is loaded do you really want to load the .NET runtime into memory?
  • Interoperability - although the .NET->COM bridge does work, my experience with other plugin-in has indicated that it can be difficult to manage the required interop's.  Also installation can be fiddly and require the strong naming and signing of various assemblies, again a difficult process to manage.

Namespace Extensions


A Namespace extension is a shell extension specifically aimed at extending the namespace (file structure) of Windows Explorer.  There are a different set of COM interface to be implemented, but a Namespace extension is essentially the same as a normal shell extension.

What can we do with a NameSpace extension?


  • Create a virtual drive pointing to our repository.
  • Use Windows Explorer to navigate and manage the objects in our repository.
  • Add custom icons and actions to the context menus of the items in our repository.
  • Complete Windows Explorer integration.

What is a PIDL?


  • For the Shell application programming interface (API), namespace objects are usually identified by a pointer to their ITEMIDLIST structure, or pointer to an item identifier list (PIDL).
  • A full PIDL starts from the desktop, and contains the item IDs of all intermediate folders in the path. It ends with the object's item ID followed by a terminating two-byte NULL. A full PIDL is similar to a fully qualified path and uniquely identifies the object in the Shell namespace.
  • A PIDL is the core data type that a namespace extension manipulates.

Documentation and Useful Links


There seams to be little good Microsoft documentation around on these subjects.  Certainly good, comphensible, examples are hard to come by.  Here are the links to the documentation and examples that I found useful.


Attachments

    Outcomes