OLE Logo

ActiveX (TM) Object Model Overview

PRELIMINARY DRAFT
Last Updated: March 9, 1996
Distribution: Public

Copyright © 1995-1996 Microsoft Corporation. All Rights Reserved.

This document contains an overview of the ActiveX (TM) Object Model.

NOTE: THIS DOCUMENT IS AN EARLY RELEASE OF THE FINAL SPECIFICATION. IT IS MEANT TO SPECIFY AND ACCOMPANY SOFTWARE THAT IS STILL IN DEVELOPMENT. SOME OF THE INFORMATION IN THIS DOCUMENTATION MAY BE INACCURATE OR MAY NOT BE AN ACCURATE REPRESENTATION OF THE FUNCTIONALITY OF THE FINAL SPECIFICATION OR SOFTWARE. MICROSOFT ASSUMES NO RESPONSIBILITY FOR ANY DAMAGES THAT MIGHT OCCUR EITHER DIRECTLY OR INDIRECTLY FROM THESE INACCURACIES. MICROSOFT MAY HAVE TRADEMARKS, COPYRIGHTS, PATENTS OR PENDING PATENT APPLICATIONS, OR OTHER INTELLECTUAL PROPERTY RIGHTS COVERING SUBJECT MATTER IN THIS DOCUMENT. THE FURNISHING OF THIS DOCUMENT DOES NOT GIVE YOU A LICENSE TO THESE TRADEMARKS, COPYRIGHTS, PATENTS, OR OTHER INTELLECTUAL PROPERTY RIGHTS.


Introduction

This document is only one part of the whole ActiveX (TM) Object Model. The other documents that make up the ActiveX (TM) Object Model are listed below.

Component Description Relevant Specifications
The ActiveX (TM) Object Model Overview (This document) The ActiveX (TM) Object Model Overview
The HTML Scripting Object Model. This is the object model implemented by Microsoft's HTML viewer component. The HTML Scripting Object Model
IExplorer Browser. This component is the core of Microsoft Internet Explorer 3.0 (IE). IExplorer Browser is a DocObject host as well as an OLE Control. The programmability interface for this object allows a script writer to execute methods such as Forward, Back, and so forth. The IE Browser Object Model

Overview

This document, and it's accompanying documents, uses the term Object Model to describe the sets of OLE Automation objects described here, including the interfaces, methods, and properties found on those objects. The term "programmabiltiy model" has been used in the past to describe the same thing.

All interfaces defined in the ActiveX (TM) Object Model are "dual". This means that they inherit from IDispatch and follow some simple rules and thus can be used by late-bound OLE Automation controllers (via IDispatch::GetIdsOfNames and IDispatch::Invoke) as well as by clients that "early-bind" (e.g. use a vtable). Early-bound clients well not only get significantly better performance, but will also be able to enjoy the simplicity and features of the COM programming model (versus having to deal with calling through IDispatch). We use the naming convention of prefixing the name of the interface with "D" (as opposed to "I") to indicate that the interface is a dual interface.

The Components

There are two primary pieces to the ActiveX (TM) Object Model: The MSHTML object and the IExplorer Browser object. Both are in-process (DLL based) COM classes. MSTHTML is the HTML viewer part of Microsoft Internet Explorer 3.0, deriving the majority of its parser and display code from the Internet Explorer 2.0 product. As a COM class object MSHTML implements the interfaces required to be a great OLE Document Object. It also implements an Automation interface but is not necessarily intended to be used as a standalone automation server. It can also be used as an OLE Control. The IExplorer Browser, the other component, is a OLE Document Object container. The IExplorer Browser is also an in-process COM class that can be used as an OLE Control. All the components are described below in more detail.

The IExplorer Browser

The IExplorer Browser is the core of what customers will perceive as "The Internet Explorer 3.0 Product." Because it is implemented as an in-process COM server, it must be "hosted" within some other process in order to be used in a standalone manner. On Nashville this process will be the Windows shell. For the IE 3.0 product this process will be a super simple EXE (IEXPLORE.EXE) which does not much more than provide a message pump.

The IExplorer Browser is a DocObject host and implements the full hyperlink interface suite (see OLE Hyperlinks). So from one perspective IExplorer is a container. But it is also a COM class object. As a COM class object it implements all the interfaces necessary to be used as an OLE Control.

As a DocObj container, the IExplorer Browser can host any DocObj, including MSHTML, with the added benefit of fully supporting hyperlinking to any document type. Those who really think they need a "simple" HTML OLE Control that does not provide these hyperlinking and DocObj host capabilities can use MSHTML directly.

As an OLE Control, the IExplorer Browser can be contained within any OLE Control container. Two very special OLE Control containers which are coded to specifically host the browser are the Nashville shell (which hosts the browser as an additional "view") and the Internet Explorer 3.0 standalone executable ("the frame") (which does not much more than provide a process and message pump).

The IExplorer Browser implements an OLE Automation object model that allows clients to programmatically control browsing. The IExplorer Browser object model is described in The IE Browser Object Model. The Nashville shell exposes this object model via the Views collection property (details TBD, owner: JoeB). The IExplorer 3.0 Frame (see below) simply expose the browser's object model as though it were it's own (the IExplorer 3.0 frame's "Application" object is the browser object).

The IExplorer Browser has it's own CLSID: CLSID_IExplorer. It is implemented in shdocvw.dll.

There is actually one other object that plays a part in this, and it only makes sense to group it with the browser component: the component that implements the Automation interface to OLE Hyperlinks. CLSID_OAHyperLink is an in-proc class object that wraps the "COM level" hyperlinks accessed via CreateHLinkFromData() etc.. (described in OLE Hyperlinks.doc). Various methods and properties in the browser object model pass references to OAHyperlinks.

The HTML Viewer

The HTML Viewer component (also called MSHTML) is an in-process COM class that can be hosted in both OLE Document Object and OLE Control containers (it also can be used as a standalone OLE Automation component; it's usefulness in this capacity is dubious because it is optimized for viewing...see the HTML Parser description below).

MSHTML implements the OLE Automation object model described in The HTML Scripting Object Model. This object model is intended to enable rich multimedia HTML content to be developed. Both scripts running inline in the HTML (i.e. VBScript) and running externally (VB4) can use the object model.

The IExplorer Frame

As mentioned above, there are two "hosts" developed to specifically house the IExplorer Browser. One is the Nashville shell. The other is the executable that customers perceive as the standalone "Internet Explorer 3.0" product, which is referred to her as the IExplorer Frame. The IE Frame is implemented in an EXE (IEXPLORE.EXE) and serves two primary purposes:

  1. The IE Frame provides a message pump, process, and other basic elements to provide the illusion to the end user that there is a standalone IE 3.0 product. To illustrate how simple this thing is, the current binary is around 12K in size.
  2. The IE Frame implements the IExplorer Browser object model.