OLE (Object Linking and Embedding)

Top  Previous  Next

Advanced > Understanding Clipboard Formats > OLE

ClipMate has the ability to store OLE objects.  Simply stated, OLE lets applications that use different data formats share data without converting the data to a common format.  For example, a sound object can be pasted into a word-processing document.  Activating the object (double-click) can then play the sound back.  Your word processor doesn't have to know how to play sounds - it just has to follow the rules of OLE.  In many cases, the OLE object can be activated or edited by double clicking on it.  In Microsoft Word for Windows, for example, the draw program is an OLE server.  Double-Click on a graphic, and it activates the Draw program to edit the object.  Within the Draw program, there is no option to save the file - instead, the option is to update the drawing in the Word for Windows document.  You can do the same thing with an Excel spreadsheet object.  You can actually embed a spreadsheet within a word processing document.  Don't like the numbers?  Double-click to edit the object in Excel.  Instead of saving the Excel file, you update the Word document.  In these cases, the Word for Windows document is considered to be a Compound Document, because it contains other types of data within itself.

OLE is initiated by an OLE Server copying data to the Clipboard, and then by an OLE Client pasting that data into itself.  The OLE Client looks at the list of available formats, from top to bottom.  If it finds an acceptable format, it just uses that format, and doesn't bother with OLE.  Otherwise, it finds the series of formats that magically comprise an OLE object, and pastes them into itself, creating the object.  These magic formats that make OLE happen are:

1.        OBJECTLINK  -  Where did the data come from?

2.        OWNERLINK  -  Which application owns the data?

3.        NATIVE  -  The data itself.

4.        PICTURE, DIB, or BITMAP  -  The "Presentation Format".

5.        DataObject  -  Required for OLE2.

6.        Object Descriptor  -  Required for OLE2.

7.        Link Source Descriptor  -  Required for OLE2.


The Presentation Format is a special case.  One of these formats is used to display the data in the client application.  The nature of this depends on the nature of the OLE object.  For a sound object, it would be an Icon of the sound recorder.  For a graphic object, it would be a picture or bitmap of the graphic itself.  Have you wondered why you get silly icons of certain applications when you're copying formatted text?  This is because the application is conforming to OLE.

When defining your Application Profile for any given OLE Server (such as the Sound Recorder) make sure that you include all of the necessary formats: ObjectLink OwnerLink, Native, and a Presentation Format.  By your having done this, ClipMate will capture and preserve the OLE objects.  Beware that OLE objects can get quite large.  If you want to enable OLE2, then you will also need DataObject,  Object Descriptor, and Link Source Descriptor.