COM Explorer offers less cumbersome alternative for tracking objects, apps
By Don Kiely
he registry in the Windows operating system has been the foundation for dealing with the increasing complexity of Windows and the Component Object Model. The registry provides a central repository for objects and application information within the Windows environment. But even in the simplest and cleanest Windows installation, the registry is a hierarchical mass of branches and data. Hunting down a problem, or just understanding all of an object's features, can quickly become an insurmountable task mired in confusing details.
COM is Microsoft's object model and the technology behind OLE and ActiveX objects. COM is somewhat analogous to the Object Management Group's Corba standard and Enterprise JavaBeans. COM makes extensive use of the registry to keep track of its objects, identifiers, and containers. Each COM object has registry keys and values stuck in several different places, so tracking all of an object's settings is tedious at best.
From 4Developers, COM Explorer gathers together in one place all the information about the COM objects located on a system. COM Explorer is a specialized registry utility for managing COM objects. It doesn't do anything different than the Windows registry editor, RegEdit, and a few hours delving into the dark corners of the registry; it just makes the job easier and quicker.
COM Explorer loads slowly as it takes the time to read data from the registry. Once the user interface appears, it presents a tabbed window on the left side that separates COM objects into ActiveX controls, dynamic link libraries (in-process) servers, and EXE (out-of-process) servers. This is an arbitrary grouping, since at this level it really doesn't matter how the object is implemented. The grouping breaks the unwieldy list of objects into manageable parts.
When you select an object from the list, COM Explorer examines the physical disk file and lists the object's attributes, which hold descriptive information about the object, such as the ProgID, CLSID, file location and size, version, and developer information. This is interesting in itself, but the real value is the Registry View in the lower right corner of the window.
Registry View pulls together in one treeview control all of the branches of the HKEY_CLASSES_ ROOT section of the registry applicable to the object. Depending on the type of object and its implementation, these can include the CLSID, class name, TypeLib, and application ID subkeys.
The Registry View can expand and examine the object's different subkeys and values. It doesn't allow additions or deletions of individual keys from here, but it does allow double-clicking on registry values to edit their data. It also allows the removal of the object from the registry, which deletes the relevant keys and subkeys, or unregisters it.
For any other changes, you have to fire up RegEdit and navigate to the keys before making any changes. While it would be more convenient to have full registry editing within COM Explorer, it isn't what the tool was designed for and this limitation probably makes it harder to trash the registry.
COM Explorer can display misbehaved objects, well-behaved objects, or both. A misbehaved object has COM information in the registry but the object files no longer exist on the drive. This can result from deleting the directory and disk files that implement the object without removing the registry entries. By opting to view only misbehaving objects, you can remove all of the invalid entries from the registry that are scattered throughout the hierarchy.
Only one object can be removed at a time, which can get tedious. The first time I used this feature to clean up my registry, I had a lot of misbehaving objects, so it took a while to delete all of them. There is no confirmation dialog box for deleting misbehaved items, since COM Explorer has already identified them as problems. You do get the chance to confirm when attempting to delete a well-behaved object, however.
A Useful Sort
The list of objects can be sorted alphabetically by program ID, class ID, file location, or type library name. Sorting by program ID is the most useful, but I found myself switching frequently between the other options as I examined various objects. If the objects are sorted by ProgID, COM Explorer can function as a replacement for tools like the Object Browser in Visual Basic for finding objects to use in custom applications.
But you'll have to do without the VB-specific features, such as direct links to object-specific help, and copying and pasting syntax into your applications.
A handy feature is the ability to compare COM files. My system is littered with what seem to be duplicate DLLs and EXEs, and sometimes entries are duplicated in the registry. This can lead to conflicts when applications load different versions of COM objects at run time. COM Explorer will compare the object attributes of the two objects to help decide which object is safe to remove from your system. COM Explorer is integrated with Windows Explorer, so right-clicking a file presents a pop-up menu and quick access to information about any COM objects that are in the file. The program will also generate an "inventory" report in either HTML or comma-delimited text files, listing all objects on the system.
As useful as I found COM Explorer to be, the product has a few annoyances that reduce its helpfulness. Documentation is sparse--just a dozen or so short screens in the help file--so don't expect to learn anything about the intricacies of COM or even how COM Explorer itself works.
Cluttered Interface
The user interface can get cluttered, and it doesn't allow resizing the windows on the right side of the screen. I was forever adjusting column widths to see the longer registry key names and value data. The OK and Cancel buttons on the report generation window seemed to be arbitrarily enabled and disabled, and I could discern no difference in what they did.
I found COM Explorer to be reliable in the information it unearthed from the registry, such as when it identified misbehaving objects. In one test I generated a list of objects it identified as misbehaving and verified that the disk files were in fact missing.
Then I ran the latest version of Microsoft's RegClean utility, which is supposed to fix these kinds of registry problems. RegClean missed a few problems, but I was able to finish the job with COM Explorer. RegClean is a batch all-or-nothing operation, while COM Explorer gives you a detailed view and fine control over changes that are made to the registry.
COM Explorer is a bit expensive for such a utility, but will probably pay for itself the first time you use it to track down a problem, saving the time and headache of using only RegEdit.
Don Kiely is a director with Information Insights, a Fairbanks, Alaska, consulting firm that specializes in application development. He is also the author of several books on Visual Basic programming techniques. He can be reached at donkiely@computer.org.