6.2.9 Object Storage Formats

The presentation data in linked or embedded objects can be thought of as a presentation object. A presentation objects can be standard, generic, or NULL. A standard presentation object is used when the format is metafile, bitmap, or device-independent bitmap (DIB). The client library supports the presentation objects, including drawing them. Neither client applications nor object handlers can use the presentation objects; they are solely for the use of the client library.

The following list gives the storage format for strings in OLE. The items appear in the order listed.

Type Description

LONG Length of string, including terminating null character.
Variable Null-terminated stream of bytes.

The following list gives the storage format for the standard presentation object used for linked and embedded objects. The items appear in the order listed.

Type Description

LONG OLE version number.
LONG Format identifier. This value is 5.
Variable Class string. For standard presentation objects, this string is METAFILEPICT, BITMAP, or DIB.
LONG Width of object, in MM_HIMETRIC units.
LONG Height of object, in MM_HIMETRIC units.
LONG Size of presentation data, in bytes.
Variable Presentation data.

The following list gives the storage format for the generic presentation object used for linked and embedded objects. Generic objects are used when the clipboard format is other than metafile, bitmap, or DIB. The items appear in the order listed.

Type Description

LONG OLE version number.
LONG Format identifier. This value is 5.
Variable Class string.
LONG Clipboard format value. If this value exists, the next item in storage is the size of the presentation data.
LONG Clipboard format name. This value exists only if the clipboard format value is NULL.
LONG Size of presentation data, in bytes.
Variable Presentation data.

The following list gives the storage format for embedded objects. The items appear in the order listed.

Type Description

LONG OLE version number.
LONG Format identifier. This value is 2.
Variable Class string.
Variable Topic string.
Variable Item string.
LONG Size of Native data, in bytes.
Variable Native data.
Variable Presentation object (standard, generic, or NULL).

The following list gives the storage format for linked objects. The items appear in the order listed.

Type Description

LONG OLE version number.
LONG Format identifier. This value is 1.
Variable Class string.
Variable Topic string.
Variable Item string.
Variable Network name string.
short Network type.
short Network driver version number.
LONG Link update options.
Variable Presentation object (standard, generic, or NULL).

The following list gives the storage format for static objects. The only difference between the format for static objects and the format for standard presentation objects is the value of the format identifier. The items appear in the order listed.

Type Description

LONG OLE version number.
LONG Format identifier. This value is 3.
Variable Class string. For static objects, this string is METAFILEPICT, BITMAP, or DIB.
LONG Width of object, in MM_HIMETRIC units.
LONG Height of object, in MM_HIMETRIC units.
LONG Size of presentation data, in bytes.
Variable Presentation data.