2.3.4 OLEPresentationStream
The OLEPresentationStream structure is contained inside an OLE Compound File Stream object ([MS-CFB] section 1.3) within the OLE Compound File Storage object ([MS-CFB] section 1.3) that corresponds to the linked object or embedded object (see section 1.3.3). There MUST be no more than 999 presentation streams in the storage object. The name of the stream is a concatenation of the prefix "\2OlePres" followed by three numeric characters, each of which is in the range of numbers from '0'-'9'. Some examples of stream names are "\2OlePres000", "\2OlePres123", and "\2OlePres999". The OLEPresentationStream structure specifies the presentation data for linked and embedded objects.
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AnsiClipboardFormat (variable) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
TargetDeviceSize |
|||||||||||||||||||||||||||||||
TargetDevice (variable) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
Aspect |
|||||||||||||||||||||||||||||||
Lindex |
|||||||||||||||||||||||||||||||
Advf |
|||||||||||||||||||||||||||||||
Reserved1 |
|||||||||||||||||||||||||||||||
Width |
|||||||||||||||||||||||||||||||
Height |
|||||||||||||||||||||||||||||||
Size |
|||||||||||||||||||||||||||||||
Data (variable) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
Reserved2 (18 bytes) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
TocSignature |
||||||||||||||||||||||||||||||
... |
TocCount |
||||||||||||||||||||||||||||||
... |
TocEntry (variable) |
||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
AnsiClipboardFormat (variable): This MUST be a ClipboardFormatOrAnsiString structure (section 2.3.1) that contains the Clipboard Format of the presentation data. If the MarkerOrLength field of the ClipboardFormatOrAnsiString structure contains 0x0000000, the OLEPresentationStream structure is invalid.<15>
-
If the MarkerOrLength field contains a value other than 0xFFFFFFFF or 0xFFFFFFFE, the value MUST NOT be greater than 0x00000201. Otherwise, the OLEPresentationStream structure is invalid.<16>
-
If the FormatOrAnsiString field of the ClipboardFormatOrAnsiString structure contains the value CF_BITMAP (section 1.3.5.1), the OLEPresentationStream structure is invalid.<17>
TargetDeviceSize (4 bytes): This MUST be set to a value greater than or equal to 0x00000004. If this is set to 0x00000004, the TargetDevice field MUST NOT be present. Otherwise, this MUST contain the size of the TargetDevice field in bytes.
-
Value
Meaning
0x00000004
The TargetDevice field MUST NOT be present.
0x0000005 — 0xFFFFFFFF
MUST be the size of the TargetDevice field in bytes.
TargetDevice (variable): This field MUST contain a DVTARGETDEVICE structure (as specified in section 2.1.7).
Aspect (4 bytes): This field contains an implementation-specific hint on how to render the presentation data on the screen. It MAY be ignored on processing.<18>
Lindex (4 bytes): This field contains an implementation-specific hint on how to render the presentation data on the screen. It MAY be ignored on processing. <19>
Advf (4 bytes): This field contains an implementation-specific hint on how to render the presentation data on the screen. It MAY be ignored on processing.<20>
Reserved1 (4 bytes): This can contain any arbitrary value and MUST be ignored on processing.
Width (4 bytes): This MUST contain the width in pixels of the presentation data.
-
If the FormatOrAnsiString field of AnsiClipboardFormat contains CF_DIB (section 2.1.1), this MUST be a DIBPresentationWidth (section 2.1.12).
-
If the FormatOrAnsiString field of AnsiClipboardFormat contains CF_METAFILEPICT (section 2.1.1), this MUST be a MetaFilePresentationDataWidth (section 2.1.8).
-
If the FormatOrAnsiString field of AnsiClipboardFormat contains CF_ENHMETAFILE (section 2.1.1), this MUST be a EnhancedMetaFilePresentationDataWidth (section 2.1.10).
-
Height (4 bytes): This MUST contain the height in pixels of the presentation data.
-
If the FormatOrAnsiString field of AnsiClipboardFormat contains CF_DIB (section 2.1.1), this MUST be a DIBPresentationDataHeight (section 2.1.13).
-
If the FormatOrAnsiString field of AnsiClipboardFormat contains CF_METAFILEPICT (section 2.1.1), this MUST be a MetaFilePresentationDataHeight (section 2.1.9).
-
If the FormatOrAnsiString field of AnsiClipboardFormat contains CF_ENHMETAFILE (section 2.1.1), this MUST be a EnhancedMetaFilePresentationDataHeight (section 2.1.11).
Size (4 bytes): This MUST contain the size, in bytes, of the Data field.
Data (variable): This MUST contain the presentation data.
-
If the FormatOrAnsiString field of AnsiClipboardFormat contains CF_DIB (section 2.1.1), the Data field MUST contain a DeviceIndependentBitmap Object structure as specified in [MS-WMF] section 2.2.2.9.
-
If the FormatOrAnsiString field of AnsiClipboardFormat contains CF_METAFILEPICT (section 2.1.1), the Data field MUST contain a Windows metafile, as specified in [MS-WMF] section 1.3.1. If, after processing the Data field the end of the stream has not been reached, then the Reserved2 field MUST be present.
-
If the FormatOrAnsiString field of AnsiClipboardFormat contains CF_ENHMETAFILE (section 2.1.1), the Data field MUST contain an Enhanced metafile as specified in [MS-WMF] section 1.3.1.
-
If the FormatOrAnsiString field of AnsiClipboardFormat contains the name of a registered clipboard format (section 2.1.1), the format of the Data field is specified by the application or the higher level protocol.
Reserved2 (18 bytes): This field MUST be present if the FormatOrAnsiString field of AnsiClipboardFormat contains CF_METAFILEPICT (section 2.1.1). Otherwise, this field MUST NOT be present. This field can contain any arbitrary value and MUST be ignored on receipt.
TocSignature (4 bytes): If this field does not contain the value 0x494E414E, the TocEntry field MUST NOT be present.
TocCount (4 bytes): This MUST contain the number of elements in the TocEntry array. If 0, the TocEntry structure MUST NOT be present.
TocEntry (variable): This MUST contain an array of TOCENTRY structures (section 2.3.5). The number of structures MUST be specified in the TocCount field. The first octet of an array element MUST immediately follow the last octet of the previous element without any alignment gaps.