Oleview.exe: OLE/COM Object Viewer


This administration and testing tool browses in a structured way, configures, activates, and tests all Microsoft Component Object Model (COM) classes installed on your computer.

You can also configure local or system-wide COM settings, including security settings, and enable or disable Distributed COM. You can activate COM classes locally or remotely to test Distributed COM setups. OleView fully supports the Component Categories specification, which is a core COM technology.

Test any COM class by double-clicking its name in Oleview. Oleview then lists the interfaces supported by that class. Double-clicking an interface entry invokes a viewer that exercises that interface.

View type library contents in Oleview to determine what methods, properties, and events a Microsoft ActiveX control supports. You can then copy a formatted OBJECT tag to the Clipboard for inserting into an HTML document. OleView is oriented toward developers and advanced users; however, the user interface offers the ability to toggle between Expert and Novice modes.

OleView displays the registry entries for each class in an easy-to-read format. The registry view (right pane) shows all relevant registry information, including named values of keys you can activate such as ApartmentModel.

The OleView window highlights active items in bold. One or objects can be activated at the same time. Dragging a file name onto the Oleview window creates a file name and binds to it.

Right-click an object in OleView to see its context menu.

The right pane has tabs for administering COM class information. You can set Distributed COM options and security as well as change keys such as LocalServer32.

Notes

Files Required

OLE/COM Object Viewer Topic


top

Setting Up OleView


To set up OleView, run Ccdist.exe, a self-extracting and self-installing file that contains Comcat.dll. Comcat.dll implements the Component Categories manager, which applications use to read and write Component Category information to and from the registry. OleView uses Comcat.dll to list the installed components on a system by category.


top

Example: Activating a Remove Server in OleView


You can activate remote servers from within Oleview in either of two ways.

  1. To use CoGetClassObject:
    1. In the left pane of Oleview, right-click an object.
    2. On the Shortcut menu, select the Create Instance On..., and then enter a computer name.
    3. For example, to activate an object on \\computer1, enter computer1, and then press OK.

  2. To use a file moniker bind and ActivateAtStorage:
    1. On the File menu, click Bind To File.
    2. Specify the UNC name of the file you want to bind to. For example, type \\computer1\docs\any.doc.

    3. Or, you can specify a moniker display name on the command line.


top

OLE/COM Object Viewer Interface Viewers


In OleView, interface viewers are Component Object Model (COM) objects. Viewers for IDataObject (Uniform Data Transfer), IDispatch, IPersistXXX, ITypeLib, and ITypeInfo are provided. There is a default interface viewer for IUnknown, so that no matter what interface you click, you get at least the default (taking advantage of the default class capabilities of Component Categories).

The ITypeLib viewer is a type library decompiler. Its output shows the .odl source for the given type library (or the part you have selected).

OLE/COM Object Viewer supports plug-in interface viewers. If you design a COM interface, or would like to use an existing interface, you can create your own interface viewers (see the IDL file for the IInterfaceViewer interface). Create an in-process COM server that implements the IInterfaceViewer interface, and then have it register the following information:

HKCR\Interface\{the IID you want to view}\OleViewerIViewerCLSID = {your clsid}

Use the Component Category Manager to register your viewer's CLSID by implementing the OLEViewer Interface Viewer CATID: {64454F82-F827-11CE-9059-080036F12502}.

IDL for IInterfaceViewer

// iview.idl
//
// Interface definitions for Ole2View Interface Viewers
//
import "unknwn.idl";

// DEFINE_GUID(IID_IInterfaceViewer,0xfc37e5ba,0x4a8e,0x11ce, 0x87,0x0b,0x08,0x00,0x36,0x8d,0x23,0x02);
//
// IInterfaceViewer::View can return the following SCODEs
//
// S_OK
// E_INVALIDARG 
// E_UNEXPECTED
// E_OUTOFMEMORY        
// 
[
    uuid(fc37e5ba-4a8e-11ce-870b-0800368d2302),
    object
]
interface IInterfaceViewer : IUnknown
{
    HRESULT View([in]HWND hwndParent, [in]REFIID riid, [in]IUnknown* punk);
}