2.3.3 OLEStream

The OLEStream structure is contained inside an OLE Compound File Stream object ([MS-CFB] section 1.3). The name of this Compound File Stream object is "\1Ole". The stream object is contained within the OLE Compound File Storage object ([MS-CFB] section 1.3) corresponding to the linked object or embedded object (see section 1.3.3). The OLEStream structure specifies whether the storage object is for a linked object or an embedded object. When this structure specifies a storage object for a linked object, it also specifies the reference to the linked object.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Version

Flags

LinkUpdateOption

Reserved1

ReservedMonikerStreamSize

ReservedMonikerStream (variable)

...

RelativeSourceMonikerStreamSize (optional)

RelativeSourceMonikerStream (variable)

...

AbsoluteSourceMonikerStreamSize (optional)

AbsoluteSourceMonikerStream (variable)

...

ClsidIndicator (optional)

Clsid (16 bytes, optional)

...

...

ReservedDisplayName (variable)

Reserved2 (optional)

LocalUpdateTime

LocalCheckUpdateTime

RemoteUpdateTime

Version (4 bytes): This MUST be set to 0x02000001. Otherwise, the OLEStream structure is invalid.<9>

Flags (4 bytes): If this field is set to 0x00000001, the OLEStream structure MUST be for a linked object and the CLSID field of the Compound File Directory Entry ([MS-CFB] section 2.6.1) of the OLE Compound File Storage object ([MS-CFB] section 1.3) MUST be set to CLSID_StdOleLink ({00000300-0000-0000-C000-000000000046}). If this field is set to 0x00000000, then the OLEStream structure MUST be for an embedded object and the CLSID field of the Compound File Directory Entry ([MS-CFB] section 2.6.1) of the OLE Compound File Storage object ([MS-CFB] section 1.3) MUST be set to the object class GUID of the creating application.

Value

Meaning

0x00000001

The OLEStream structure MUST be for a linked object.

0x00000000

The OLEStream structure MUST be for an embedded object.

0x00001000

This bit is set as an implementation-specific hint supplied by the application or by a higher-level protocol that creates the data structure. The bit MAY be ignored on processing of this data structure. A server implementation which does not ignore this bit MAY cache the storage when the bit is set.<10>

LinkUpdateOption (4 bytes): This field contains an implementation-specific hint supplied by the application or by a higher-level protocol that creates the data structure. The hint MAY be ignored on processing of this data structure.<11>

Reserved1 (4 bytes): This MUST be set to 0x00000000. Otherwise, the OLEStream structure is invalid.<12>

ReservedMonikerStreamSize (4 bytes): This MUST be set to the size, in bytes, of the ReservedMonikerStream field plus the size of this field. If this field has a value 0x00000000, the ReservedMonikerStream field MUST NOT be present.

ReservedMonikerStream (variable): This MUST be a MONIKERSTREAM structure (section 2.3.3.1) that can contain any arbitrary value and MUST be ignored on processing.

Note The fields that follow MUST NOT be present if the OLEStream structure is for an embedded object.

RelativeSourceMonikerStreamSize (4 bytes): This MUST be set to the size, in bytes, of the RelativeSourceMonikerStream field plus the size of this field. If this field has a value 0x00000000, the RelativeSourceMonikerStream field MUST NOT be present.

RelativeSourceMonikerStream (variable): This MUST be a MONIKERSTREAM structure (section 2.3.3.1) that specifies the relative path to the linked object.

AbsoluteSourceMonikerStreamSize (4 bytes): This MUST be set to the size, in bytes, of the AbsoluteSourceMonikerStream field plus the size of this field. This field MUST NOT contain the value 0x00000000.

AbsoluteSourceMonikerStream (variable): This MUST be a MONIKERSTREAM structure (section 2.3.3.1) that specifies the full path to the linked object.

If the RelativeSourceMonikerStream field is present, it MUST be used by the container application instead of the AbsoluteSourceMonikerStream. If the RelativeSourceMonikerStream field is not present, the AbsoluteSourceMonikerStream MUST be used by the container application.

ClsidIndicator (4 bytes): This MUST be the LONG (as specified in section 2.2.27 of [MS-DTYP]) value -1. Otherwise the OLEStream structure is invalid.<13>

Clsid (16 bytes): This MUST be the CLSID (Packet) (section 2.1.2) containing the object class GUID of the creating application.

ReservedDisplayName (variable): This MUST be a LengthPrefixedUnicodeString (section 2.1.5) that can contain any arbitrary value and MUST be ignored on processing.

Reserved2 (4 bytes): This can contain any arbitrary value and MUST be ignored on processing.

LocalUpdateTime (8 bytes): This MUST be a FILETIME (Packet) (section 2.1.3) that contains the time when the container application last updated the RemoteUpdateTime field.

LocalCheckUpdateTime (8 bytes): This MUST be a FILETIME (Packet) (section 2.1.3) that contains the time when the container application last checked the update time of the linked object.

RemoteUpdateTime (8 bytes): This MUST be a FILETIME (Packet) (section 2.1.3) that contains the time when the linked object was last updated.