ActiveX Document

Last updated

ActiveX Document (also known as DocObject or DocObj [1] ) is a Microsoft technology that allows users to view and edit Microsoft Word, Excel, and PDF documents inside web browsers. [2] It defines a set of Component Object Model coding contracts between hosting programs like Internet Explorer or Microsoft Office Binder [3] and hosted documents from programs like Microsoft Word, Microsoft Excel and Adobe Reader. This allows them to negotiate communications about commands like save and navigate, as well as merging user interface elements such as menu, [4] to provide a unified user experience.

Contents

Initially designed for compound documents based on COM Structured Storage, the technology allows one single hosting program like Office Binder to contain unlimited type of documents. [3] The server program that provides an ActiveX document can be an EXE or a DLL server.

Code contracts

There are a few code contracts that ActiveX documents and their container need to implement in order to communicate about their capabilities and requirements.

An ActiveX document server application needs to implement the following code contracts that are expected by an ActiveX document container that is going to host the document: [5]

An ActiveX document container application needs to implement the following code contracts [6]

Developer Support

Microsoft has ActiveX Document support in its developer tools to help programmers in creating ActiveX Document applications.

In Visual C++, programmers can include Microsoft Foundation Classes's support for ActiveX Documents in the MFC project wizard. A programmer can choose to add ActiveX document server and/or container support to the new program by checking a checkbox during the project creation process. [7]

In Visual Basic, ActiveX Document Migration wizard helps programmers to convert VB forms into ActiveX documents. [8]

In Visual FoxPro, The ActiveDoc Base Class supports development for ActiveX document servers. [9]

Related Research Articles

VBScript is an Active Scripting language developed by Microsoft that is modeled on Visual Basic. It allows Microsoft Windows system administrators to generate powerful tools for managing computers with error handling, subroutines, and other advanced programming constructs. It can give the user complete control over many aspects of their computing environment.

Visual Basic for Applications (VBA) is an implementation of Microsoft's event-driven programming language Visual Basic 6, which was declared legacy in 2008, and is an associated integrated development environment (IDE). Although pre-.NET Visual Basic is no longer supported or updated by Microsoft, the VBA programming language was upgraded in 2010 with the introduction of Visual Basic for Applications 7 in Microsoft Office applications. As of 2020, VBA has held its position as "most dreaded" language for developers for 2 years, according to some who participated in surveys undertaken by Stack Overflow..

ActiveX Software framework by Microsoft introduced in 1996

ActiveX is a deprecated software framework created by Microsoft that adapts its earlier Component Object Model (COM) and Object Linking and Embedding (OLE) technologies for content downloaded from a network, particularly from the World Wide Web. Microsoft introduced ActiveX in 1996. In principle, ActiveX is not dependent on Microsoft Windows operating systems, but in practice, most ActiveX controls only run on Windows. Most also require the client to be running on an x86-based computer because ActiveX controls contain compiled code.

Object Linking & Embedding (OLE) is a proprietary technology developed by Microsoft that allows embedding and linking to documents and other objects. For developers, it brought OLE Control Extension (OCX), a way to develop and use custom user interface elements. On a technical level, an OLE object is any object that implements the IOleObject interface, possibly along with a wide range of other interfaces, depending on the object's needs.

The Graphics Device Interface (GDI) is a Microsoft Windows application programming interface and core operating system component responsible for representing graphical objects and transmitting them to output devices such as monitors and printers.

Microsoft Visual C++ Integrated development environment product by Microsoft

Microsoft Visual C++ (MSVC) is a compiler for the C, C++, and C++/CLI programming languages by Microsoft. MSVC is proprietary software; it was originally a standalone product but later became a part of Visual Studio and made available in both trialware and freeware forms. It features tools for developing and debugging C++ code, especially code written for the Windows API, DirectX and .NET.

JScript is Microsoft's dialect of the ECMAScript standard that is used in Microsoft's Internet Explorer.

Windows Script Host

The Microsoft Windows Script Host (WSH) is an automation technology for Microsoft Windows operating systems that provides scripting abilities comparable to batch files, but with a wider range of supported features. This tool was first provided on Windows 95 after Build 950a on the installation discs as an optional installation configurable and installable by means of the Control Panel, and then a standard component of Windows 98 and subsequent and Windows NT 4.0 Build 1381 and by means of Service Pack 4. The WSH is also a means of automation for Internet Explorer via the installed WSH engines from IE Version 3.0 onwards; at this time VBScript became means of automation for Microsoft Outlook 97. The WSH is also an optional install provided with a VBScript and JScript engine for Windows CE 3.0 and following and some third-party engines including Rexx and other forms of Basic are also available.

Microsoft Foundation Class Library (MFC) is a C++ object-oriented library for developing desktop applications for Windows.

ASP.NET is an open-source, server-side web-application framework designed for web development to produce dynamic web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, applications and services.

Windows Forms Graphical user interface software library

Windows Forms (WinForms) is a free and open-source graphical (GUI) class library included as a part of Microsoft .NET Framework or Mono Framework, providing a platform to write rich client applications for desktop, laptop, and tablet PCs. While it is seen as a replacement for the earlier and more complex C++ based Microsoft Foundation Class Library, it does not offer a comparable paradigm and only acts as a platform for the user interface tier in a multi-tier solution.

The Active Template Library (ATL) is a set of template-based C++ classes developed by Microsoft, intended to simplify the programming of Component Object Model (COM) objects. The COM support in Microsoft Visual C++ allows developers to create a variety of COM objects, OLE Automation servers, and ActiveX controls. ATL includes an object wizard that sets up primary structure of the objects quickly with a minimum of hand coding. On the COM client side ATL provides smart pointers that deal with COM reference counting. The library makes heavy use of the curiously recurring template pattern.

ADO.NET is a data access technology from the Microsoft .NET Framework that provides communication between relational and non-relational systems through a common set of components. ADO.NET is a set of computer software components that programmers can use to access data and data services from a database. It is a part of the base class library that is included with the Microsoft .NET Framework. It is commonly used by programmers to access and modify data stored in relational database systems, though it can also access data in non-relational data sources. ADO.NET is sometimes considered an evolution of ActiveX Data Objects (ADO) technology, but was changed so extensively that it can be considered an entirely new product.

Windows Template Library (WTL) is a free software, object-oriented C++ template library for Win32 development. WTL was created by Microsoft employee Nenad Stefanovic for internal use and later released as an unsupported add-on to Visual Studio and the Win32 Framework SDK. It was developed primarily as a light-weight alternative to the Microsoft Foundation Classes and builds upon Microsoft's ATL, another lightweight API widely used to create COM and ActiveX libraries.

Microsoft Data Access Components framework

Microsoft Data Access Components is a framework of interrelated Microsoft technologies that allows programmers a uniform and comprehensive way of developing applications that can access almost any data store. Its components include: ActiveX Data Objects (ADO), OLE DB, and Open Database Connectivity (ODBC). There have been several deprecated components as well, such as the Microsoft Jet Database Engine, MSDASQL, and Remote Data Services (RDS). Some components have also become obsolete, such as the former Data Access Objects API and Remote Data Objects.

In Microsoft Windows applications programming, OLE Automation is an inter-process communication mechanism created by Microsoft. It is based on a subset of Component Object Model (COM) that was intended for use by scripting languages – originally Visual Basic – but now is used by several languages on Windows. All automation objects are required to implement the IDispatch interface. It provides an infrastructure whereby applications called automation controllers can access and manipulate shared automation objects that are exported by other applications. It supersedes Dynamic Data Exchange (DDE), an older mechanism for applications to control one another. As with DDE, in OLE Automation the automation controller is the "client" and the application exporting the automation objects is the "server".

COM Structured Storage is a technology developed by Microsoft as part of its Windows operating system for storing hierarchical data within a single file. Strictly speaking, the term structured storage refers to a set of COM interfaces that a conforming implementation must provide, and not to a specific implementation, nor to a specific file format. In addition to providing a hierarchical structure for data, structured storage may also provide a limited form of transactional support for data access. Microsoft provides an implementation that supports transactions, as well as one that does not.

An NTFS reparse point is a type of NTFS file system object. It is available with the NTFS v3.0 found in Windows 2000 or later versions. Reparse points provide a way to extend the NTFS filesystem. A reparse point contains a reparse tag and data that are interpreted by a filesystem filter identified by the tag. Microsoft includes several default tags including NTFS symbolic links, directory junction points, volume mount points and Unix domain sockets. Also, reparse points are used as placeholders for files moved by Windows 2000's Remote Storage Hierarchical Storage System. They also can act as hard links, but aren't limited to point to files on the same volume: they can point to directories on any local volume. The feature is inherited to ReFS.

Component Object Model (COM) is a binary-interface standard for software components introduced by Microsoft in 1993. It is used to enable inter-process communication object creation in a large range of programming languages. COM is the basis for several other Microsoft technologies and frameworks, including OLE, OLE Automation, Browser Helper Object, ActiveX, COM+, DCOM, the Windows shell, DirectX, UMDF and Windows Runtime. The essence of COM is a language-neutral way of implementing objects that can be used in environments different from the one in which they were created, even across machine boundaries. For well-authored components, COM allows reuse of objects with no knowledge of their internal implementation, as it forces component implementers to provide well-defined interfaces that are separated from the implementation. The different allocation semantics of languages are accommodated by making objects responsible for their own creation and destruction through reference-counting. Type conversion casting between different interfaces of an object is achieved through the QueryInterface method. The preferred method of "inheritance" within COM is the creation of sub-objects to which method "calls" are delegated.

Microsoft Office shared tools are software components that are included in all Microsoft Office products.

References

  1. Definition of ActiveX Documents
  2. Microsoft readies DocObject; technology will allow document editing in Web browsers, InfoWorld, April 29, 1996, page 49
  3. 1 2 Microsoft promises compound documents. (Win95 Suites Set to Clash) by Greenberg, Ilan, InfoWorld June 5, 1995 http://www.accessmylibrary.com/article-1G1-17053478/microsoft-promises-compound-documents.html
  4. Menus in Active Documents, Visual FoxPro 7.0 documentation, by Microsoft https://msdn.microsoft.com/en-us/library/aa903362(v=VS.71).aspx
  5. The Visual Programmer Puts ActiveX Document Objects Through Their Paces, by Joshua Trupin, Microsoft Systems Journal, June 1996, http://www.microsoft.com/msj/archive/S37B.aspx
  6. Active Document Containers, Visual Studio 2012 documentation, by Microsoft, https://msdn.microsoft.com/en-us/library/644x1yy6.aspx
  7. Compound Document Support, MFC Application Wizard, Visual Studio 2012 documentation, by Microsoft, https://msdn.microsoft.com/en-us/library/fa2f8zdk.aspx
  8. You can't go there today. (ActiveX application development; Microsoft's Visual Basic 5.0 and Visual C++ 5.0, Borland's Delphi 3.0) by Blumenthal, Holly, InfoWorld | May 19, 1997 http://www.accessmylibrary.com/article-1G1-19431766/you-cant-go-there.html
  9. Creating an Active Document, Visual Studio 7.0 documentation, by Microsoft https://msdn.microsoft.com/en-us/library/aa903396(v=vs.71).aspx