The extension we will build in this chapter is far more contrived than the previous examples. It does absolutely nothing. The point of this project is to learn how to build a namespace extension. Because most of the code in a namespace extension can be of a proprietary nature, it is best that we use an example that is fairly easy to implement yet covers all of the major features of a namespace extension.
Our project, which we’ll call
DemoSpace, begins with a junction point under
Root will contain five “folders”
through 4. Each folder will contain “items” numbered
through the current folder number. DemoSpace is shown in Figure 11.6.
Figure 11-6. DemoSpace
When we wrote shell extensions, each extension mapped to one object. That object implemented all the interfaces that were required by the extension. But in this case, things work a little differently. Folders operate independently of the view. It is perfectly legal for a namespace extension to provide several views. So theoretically, folders and views represent a one-to-many relationship.
Namespace extensions will contain several objects, not just one. One
object will implement
IPersistFolder. This object can be associated with
the action that takes place in the tree view. Another object will
IShellView, which of course, represents the content ...