









|

Namespace Explorer tool

The Namespace Explorer tool allows you to explore and interrogate the Windows Vista Shell objects.
The Windows Shell wraps the file-system and various virtual objects, such as the Recycle Bin,
in its own hierarchical namespace. The root of this hierarchy is the Desktop object, and the items
below it are laid out like you are probably familiar with when browsing the Windows Explorer.
The Shell uses these wrappers to support stuff like Shell Links, thumbnail view,
ZIP Folders (where you navigate into a file),
and the Recycle Bin, which is actually a container for one or more physical file-system
folders.
This tool allows you to examine exactly how items are arranged and which COM objects
they support and respond to. There are some
similar tools
available, but they aren't updated for Windows Vista and I needed more detailed data
dumps for some of the new Vista-only interfaces.
This tool, however, is updated to interrogate the Shell objects with the latest
documented and undocumented COM interfaces, as well as dumping the property set
values that now have become increasingly important for Shell objects.
Being able to watch what data that hides behind all the COM interfaces can be extremely
useful if you are developing for the Windows Shell.
You can instruct the tool to use the HKEY_CLASSES_ROOT\Interface Registry
branch for the search for supported COM interfaces on an object. This part of the Registry
is usually updated by several Microsoft components, such as Internet Explorer, and this
tool will also try to install several undocumented and popular interfaces here so
the scanning result gets more complete.
To make use of this feature, you must enable the
"Do Full Interface Scan" option in the Interfaces page.
While the interfaces from the Registry scan appear to be named, that doesn't mean
that they are also documented.
On my system there are about 10,000 registered interfaces and
this is a great source for debugging. Quite a few of them aren't to be found in the
Windows SDK files however, so you'll know them only by name.
Obviously there are also a number of completely undocumented interfaces used
for internal processing by the Shell, where even the IID is unknown
and will never be shown by this tool.
The Source Code
The source code for this tool is available as a download below.
The code uses the native Windows Vista NameSpaceTreeControl control to
display the Shell navigation tree. You can find a
comparable control
that I wrote a long time ago which does much the same manually, even if the
new Vista control
has some really nice features, such as threaded image-loading.
In addition, I'm using the Vista threadpool for
an experiment on splitting the (possible heavy) GUI updates into several tasks
for each Tab page. This allows
the GUI to work seamlessly, even if querying a large number of COM interfaces on
a particular Shell item to gather the needed information about it may take a
considerable time.
Still when you do the scan from the Registry entries, things will start to slow down and
you may have to wait several seconds for the result to arrive, depending on the
CPU power of your workstation.

The tool will submit several work tasks to a thread pool.
One of these tasks can be particular long-winding and may take
several seconds to complete depending on which Shell item you click on.
If you have 4 cores/CPUs on your hardware, the code will attempt to split this
task into several chunks to maximize the through-put. It will split the task into 3 to
allow most of the CPUs to start processing the work, but still reserve one CPU free
to complete the remaining tasks (which are always quick and non CPU intensive) and
to allow the GUI thread to run without hindrance.
Source Code Dependencies
Windows Vista
Microsoft Visual Studio.NET 2008
Microsoft WTL 7.5 Library
Microsoft ATL Library
Download Files
Written by Bjarke Viksoe. Article submitted 12/27/2008.
To the top
|
 |