Export (0) Print
Expand All

attMAPIProps

Last modified: January 16, 2009

Applies to: Office 2010 | Outlook 2010 | Visual Studio

The attMAPIProps attribute is special in that it can be used to encode any MAPI property that does not have a counterpart in the set of existing TNEF-defined attributes. The attribute data is a counted set of MAPI properties laid end-to-end. The format of this encoding, which allows for any set of MAPI properties, is as follows: 

Property_Seq:

property-count Property_Value,...

There must be as many Property_Value items as the property-count value indicates.

Property_Value:

property-tag Property property-tag Proptag_Name Property

The property-tag is simply the value associated with the property identifier, such as 0x0037001F for PR_SUBJECT (PidTagSubject).

Property:

Value value-count Value,...

Value:

value-data value-size value-data padding value-size value-IID value-data padding

Proptag_Name:

name-guid name-kind name-id name-guid name-kind name-string-length name-string padding

The encapsulation of each property varies based on the property identifier and the property type. Property tags, identifiers, and types are defined in the Mapitags.h and Mapidefs.h header files.

If the property is a named property, then the property tag is immediately followed by the MAPI property name, consisting of a globally unique identifier (GUID), a type, and either an identifier or a Unicode string.

Multivalued properties and properties with variable length values, such as the PT_BINARY, PT_STRING8, PT_UNICODE, or PT_OBJECT property types, are treated in the following way. First the number of values, encoded as a 32-bit unsigned long, is placed in the TNEF stream, followed by the individual values. Each property's value-data is encoded as its size in bytes followed by the value-data itself. The value-data is padded out to a 4-byte boundary, although the amount of padding is not included in the value-size.

If the property is of type PT_OBJECT, the value-size is followed by the interface identifier of the object. The current implementation of TNEF only supports the IID_IMessage, IID_IStorage, and IID_Istream interface identifiers. The size of the interface identifier is included in the value-size.

If the object is an embedded message (that is, it has a property type of PT_OBJECT and an interface identifier of IID_Imessage), the value data is encoded as an embedded TNEF stream. The actual encoding of an embedded message in TNEF implementation is done by opening a second TNEF object for the original stream and processing the stream inline.

Community Additions

ADD
Show:
© 2014 Microsoft