OLE Concepts

The concepts used in OLE are best described by contrasting them with the approach adopted by clipboard and DDE:

  • When using the clipboard, an application obtains data from another application in a standard format, usually ASCII, a bitmap or a metafile. This data exists only as data; there is no link with the application that originally placed the data in the clipboard.

  • When using DDE, an application also obtains data from another application in a standard format, such as ASCII, bitmap or metafile. However, the client can establish and maintain a link with the application which delivered the data. Should the data change in the server application, the client application's data is also updated.

    OLE also enables an application to obtain data from another application; in this instance the data can be in two formats:

  • One format is understood only by the application sending the data

  • The display format (ASCII, bitmap or metafile) is understood by the receiving application, and is used to display the data on the screen.

    When an object is linked, only the references to the actual data, including the name of the server application, are embedded within the client document. In both cases, the references allow the OLE libraries to execute the server and properly instruct it.

    When initially embedding or linking objects, client and server applications typically exchange data using the Windows clipboard. When the server puts data on the clipboard, it uses various combinations of four types of data:

  • Native data is specific to the server and likely to be alien to the client.

  • Presentation data uses one of several display formats commonly used by Windows programs to render data.

  • OwnerLink data is the name and address identifying the object or application that owns the data.

  • ObjectLink data uses the same format as OwnerLink data but describes the application and object from which the data originated.

    The order in which this data is put on the clipboard, or otherwise presented to the client, determines what type of object is intended.

    For example, if OwnerLink data is presented first, then a linked object is intended. If Native data is first and OwnerLink is second, then the object can be embedded (though not necessarily rendered properly).

    In fact, a presentation format is optional for an embedded object, partly because some objects are meant to be invisible. If no presentation data is available and understood by the client and no object handler is provided by the server, the object will not be properly rendered by the client.

    The significance of this approach may be appreciated by way of an example. Voice annotation may be attached to a word processing application; the word processing application need not have any facility to support or manage voice. The word processor will store the data in two formats; the digitized sound and a display format (an icon). When the icon is selected in the document, a voice application is invoked and the word processing application passes the digitized sound to the voice application, which then plays the sound.


    [Back: Object Linking and Embedding]
    [Next: Linking versus Embedding]