2.4.2.2 Variable Length Property or Multiple-Valued Property Entry

The entry for a variable length property has the following structure.


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

Property Tag

Flags

Size

Reserved

Property Tag (4 bytes): Same as the description in section 2.4.2.1.

Flags (4 bytes): Same as the description in section 2.4.2.1.

Size (4 bytes): This value is interpreted based on the property type, which is specified in the Property Tag field. If the message contains an embedded message attachment or a storage attachment, this field MUST be set to 0xFFFFFFFF. Otherwise, the following table shows how this field is interpreted for each property type. The property types are specified in [MS-OXCDATA] section 2.11.1.

Property type

Meaning of Size value

Variable length property, except for PtypString or PtypString8

Size MUST be equal to the size of the stream where the value of the property represented by this entry is stored.

PtypString

Size MUST be equal to 2 plus the size of the stream where the value of the property represented by this entry is stored. The string being stored MUST<2> have at least one character. When parsing property streams, clients MUST issue a MAPI_E_BAD_VALUE error for any zero-length property streams of PtypString.

PtypString8

Size MUST be equal to 1 plus the size of the stream  where the value of the property represented by this entry is stored. The string being stored MUST have at least one character. When parsing property streams, clients MUST issue a MAPI_E_BAD_VALUE error for any zero-length property streams  of PtypString8.

Multiple-valued fixed length property

Size MUST be equal to the size of the stream  where all values of the property represented by this entry are stored.

Multiple-valued variable length property

Size MUST be equal to the size of the length stream  where the lengths of the value streams  for the property represented by this entry are stored.

Reserved (4 bytes): This field MUST be ignored when reading a .msg file. When writing a .msg file, this field MUST be set to 0 if the message does not contain an attachment. This field MUST be set to 0x01 if the message contains an embedded message attachment and to 0x04 if the message contains a storage attachment. The following table shows the required value for this field based on the value of the PidTagAttachMethod property ([MS-OXCMSG] section 2.2.2.9).

PidTagAttachMethod property value

Required Reserved field value

ATTACH_EMBEDDED_MSG (0x00000005)

0x01

ATTACH_OLE (0x00000006)

0x04