Condividi tramite


ActiveX Controls

A Microsoft ActiveX control is essentially a simple OLE object that supports the IUnknown interface. This section offers solutions for making a control work well in the Internet environment, with the ultimate goal of delivering optimal quality of service to users. For example, because browser speed is one of the primary factors in users' perception of quality, this section aims to provide solutions that allow an HTML document or page to become visible as soon as possible and interactive very shortly thereafter, while allowing controls to retrieve large data blocks in the background.

Overviews/Tutorials

Topic Contents
About ActiveX Controls

This section introduces ActiveX Controls and provides general guidelines for control developers. It includes information about run-time licensing for an ActiveX control, identifying an ActiveX control as safe for scripting or safe for code download, packaging an ActiveX control in a .cab file, and applying a test certificate to an ActiveX control.

About Control Instantiation

How does a container bring control class code (binary executable code) into memory and instantiate a control of that class?

About Cooperative and Asynchronous Data Retrieval

To deliver optimal quality of service to browser users, a control must read data from an external source in a cooperative manner as much as possible. That is, the control should support reading linked data in an asynchronous manner, paying attention to container prioritization and allowing the container to participate in the transfer as it wants. To provide the container with authority over the binding operation, the control should use the IBindHost::MonikerBindToStorage and IBindHost::MonikerBindToObject methods to bind to any moniker.

About Internet COM Object Requirements

There is no question that OLE Controls, or Component Object Model (COM) objects in general, are useful as part of a document or page on an Internet site. However, some problems exist with regard to how a control is specified within a document, and how a control can behave well in a slow-link environment such as the Internet, including how the control retrieves its data in an incremental or progressive fashion, working well with other controls that might also be retrieving their data in the same manner.

About IObject Safety Extensions for Internet Explorer

This document describes the extensions to the IObjectSafety interface that support the new security features implemented in Microsoft Internet Explorer 4.0.

Added Standard Properties, Methods, Events, and Interfaces

The following table summarizes the added standard dispIDs described in this article.

Building ActiveX Controls for Internet Explorer

This article covers features of Windows Internet Explorer that a developer writing ActiveX Controls should take into account when targeting Internet Explorer as a container. Some of the material in this article discusses existing technologies that have increased relevance with Internet Explorer; other sections discuss new technologies and services that are available only to a control in Internet Explorer.

Communicating Control Readiness

For all persistence interfaces other than IPersistMoniker, the authoring tool or container assumes that once IPersist*::Load returns, the control has loaded all its properties. However, controls that use data paths might not actually have all of their data at this time.

Component Categories for Describing Internet-Aware Objects

A category identifier (CATID) is a GUID that is stored in the registry as an attribute of a class. There are various useful categories for introducing a ActiveX control to its container; they describe which features the object requires and those it implements.

Data Path Properties

This article is, however, concerned with the more general problem of retrieving any significant amounts of data in a cooperative fashion from possibly many distributed locations after the control has already been instantiated and is possibly interacting with the container and the user in other ways. This capability has been called "Progressive Rendering," "Progressive Property Disclosure," and "Progressive Downloading." The term "Progressive Data Retrieval" will be used to refer to all of these more special cases at once, because it makes no assumptions about the exact type of data that is being retrieved—for example, it might be properties, might be images, might be anything.

Designing Secure ActiveX Controls

Any ActiveX control should be conceived and designed with security in mind.

How to Register an ActiveX Object as the Player for a Media Type

This topic describes how to register a ActiveX object as the viewer or player for a particular media type (MIME). This registration is essential for Internet Explorer to launch the correct player when interpreting the standard HTML A HREF tag or the Netscape-introduced EMBED tag. Without this registration, it is impossible for Internet Explorer to guess what application to use to display or play an unknown media file.

Internet Awareness for Objects, Controls, and Containers

The following documents, which are referenced in text using shortened names, contain information relevant to COM objects.

Introduction to ActiveX Control Containers

This article is an overview for ActiveX control containers. The following sections explain how to implement and program ActiveX control containers that will function well with other controls and containers.

Introduction to ActiveX Controls

The purpose of this topic is to provide guidelines for implementing ActiveX Controls that interoperate well with containers and other controls. This article defines the minimum set of interfaces, methods, and features that are required of ActiveX Controls to accomplish seamless and useful interoperability.

Licensing ActiveX Controls

This article explains the licensing strategy for ActiveX controls. In addition, it describes the functionality that must be implemented on an ActiveX control in order to support this strategy.

Managing ActiveX Control Loading

Like other software programs, ActiveX controls may contain vulnerabilities. Loading vulnerable ActiveX controls into Internet Explorer can place your computer at risk. This article shows how to prevent Internet Explorer from loading vulnerable ActiveX controls. It also shows how to redirect such requests to load alternate, more secure ActiveX controls.

Non-Admin ActiveX Controls

For many existing and future ActiveX controls, Windows Internet Explorer 8 removes administrative involvement from the installation process. The solution addresses issues raised by enterprise customers who used previous versions of Windows Internet Explorer, where administration of controls was not optimal. Non-administrative ActiveX controls (or per-user ActiveX installation) is available on Windows Vista and later.

Packaging ActiveX Controls

This article introduces a data-compression technology and associated tool set that you can use to package your ActiveX control for faster, more efficient downloading over the Internet or an intranet.

Palette Management for ActiveX Objects

This document describes palette management for ActiveX objects, specifically ActiveX Controls and Active Document objects. The palette management rules described herein allow multiple controls inside a form or an HTML page to display correctly, while still leaving enough flexibility to allow a control to demand palette control. In general, containers are responsible for palette management, and contained objects (for example, controls) should only realize their palettes in the background.

Per-Site ActiveX Controls

Internet Explorer 8 allows greater control of where and under what context ActiveX controls can run. In this version of Internet Explorer, ActiveX controls that are embedded as Web objects are presented to the user as add-ons. Through the new Manage Add-ons dialog box, the registry, or site-locking technology (such as the SiteLock ATL Template), these add-ons can be restricted for use on specific Web sites.

Safe Initialization and Scripting for ActiveX Controls

This article describes the code that a control developer should implement to ensure safe initialization and safe scripting for a ActiveX control.

Security Considerations: ActiveX

This document provides information about security considerations related to ActiveX.

Standard Internet-Aware Objects

As a benefit to control developers, Microsoft will supply Internet-aware picture, sound, and video objects that will make dealing with these data formats in the Internet environment a non-issue for many controls. The existing picture object, for example, makes a control's manipulation of a bitmap, metafile, or icon nearly effortless. The additional objects described here aim to do the same for their respective data types, where all standard objects will support the ability to retrieve large data BLOBs in an asynchronous manner.

Storage of Control Persistent Data

When a control has any persistent data at all, the class identifier (CLSID) element always exists along with one or both of the other two elements. How these elements are stored in relation to the container document involves the concepts of embedding and linking, which originated in OLE Documents (the OLE compound document architecture), described in a following section.

Supporting Offline Browsing in Applications and Components

This article describes the API elements that enable third-party developers to hook into the offline browsing architecture. It also provides some recommendations to help developers provide a seamless experience for users.

Using ActiveX Controls to Automate Your Web Pages

This article describes how a developer can add ActiveX support to an existing OLE Automation control.

 

Conceptual

Behaviors Library

Other Resources

WebControls Reference