Using OLE to Share Data Between Applications

Windows 95 includes built-in OLE functionality that enables you to share data between OLE-compliant applications. Using applications that take advantage of OLE technology, you can create OLE documents that contain multiple types of data and that allow you (or other users) to edit or display that data without running other applications.

OLE is a technology built into Windows 95 that improves on the OLE 1.0 standard. It provides services for sharing OLE objects (units of data) and the related functions needed to manipulate that data. In Windows 95, the file STORAGE.DLL manages OLE documents.

Under Windows 95, applications that use OLE technology can use new OLE objects, and new OLE applications can use OLE 1.0 objects. However, in each case, functionality is limited to OLE 1.0. For example, OLE 1.0 does not include in-place interaction, so when you double-click an object in an OLE 1.0 application, the source application starts and the object is displayed in another window.

The new OLE technology provides a way of communicating between container applications and object applications. Container applications maintain OLE documents, and object applications act as servers to provide various data objects (such as text, bitmaps, spreadsheets, spreadsheet cells, or sound clips) to be included in the OLE document. The container application does not need any information about the object application or its specific data type to communicate with it.

Windows 95 keeps track of OLE objects by keeping an entry for each one in the Registry. Each entry includes a unique identification tag for the object and an application identifier. The application identifier is also used as a class name when OLE objects are placed in OLE containers. For example, "Word.Document.6" is the application identifier for a Word 6.0 document.

Note

With ClipBook Viewer, an OLE application that is located in the OTHER\CLIPBOOK directory on the Windows 95 compact disk, you can share OLE objects for use in documents across a network. For more information, see Help in ClipBook Viewer.

OLE objects can be visually edited, meaning that users can activate objects and edit, play, or otherwise manipulate them in the location in which they are embedded.

To enable visual editing, both the container application and the object application must be OLE-compliant and must support the OLE visual editing interface. If either the container or the object application (or both) meets only the OLE 1.0 specification, the object application will be launched in its own window for editing. For example, Corel® Draw 4.0 implements some features of OLE that do not include the visual editing interface, so when a Corel Draw 4.0 object is opened for editing, the Corel Draw 4.0 application will start in its own window.

If an embedded object has a filename extension that is not associated with any application, you may be unable to successfully activate it. You must first associate the file type with an application. For information about associating file types with applications, see online Help.

To move or copy an object, you can drag it from one container to another. When doing so, use the following key combinations.

Mouse Action

Result

Drag and drop

Determined by target and source; usually Move

SHIFT+drag and drop

Move the object

CTRL+drag and drop

Copy the object

SHIFT+CTRL+drag and drop

Link the object from the source to the container


For OLE-compliant applications, when an object is dragged between documents, it automatically becomes embedded in the destination document, unless the data type is the same for both the source and the destination application. In this case, the information is merely placed as native data.