TNEF Stream Syntax

Last modified: January 16, 2009

Applies to: Office 2010 | Outlook 2010 | Visual Studio

This topic presents a Bakus-Nauer like description of the TNEF stream syntax. In this description, nonterminal elements that have a further definition are in italics. Constants and literal items are in bold. Sequences of elements are listed in order on a single line. For example, the Stream item consists of the constant TNEF_SIGNATURE, followed by a Key, followed by an Object. When an item has more than one possible implementation, the alternatives are listed on consecutive lines. For example, an Object can consist of a Message_Seq, a Message_Seq followed by an Attach_Seq, or just an Attach_Seq.


   TNEF_SIGNATURE    Key    Object   


a nonzero 16-bit unsigned integer

TNEF enabled transports generate this value before using the TNEF implementation to generate a TNEF stream.


   Message_Seq Message_Seq Attach_Seq Attach_Seq   


   attTnefVersion attTnefVersion Msg_Attribute_Seq attTnefVersion attMessageClass attTnefVersion attMessageClass Msg_Attribute_Seq attMessageClass attMessageClass Msg_Attribute_Seq Msg_Attribute_Seq   


   LVL_MESSAGE attTnefVersion sizeof(ULONG)    0x00010000 checksum


   LVL_MESSAGE attMessageClass    msg_class_length msg_class checksum


   Msg_Attribute Msg_Attribute Msg_Attribute_Seq   


   LVL_MESSAGE attribute-ID attribute-length attribute-data checksum

Attribute-ID is one of the TNEF attribute identifiers, such as attSubject. Attribute-length is the length in bytes of the attribute data. Attribute-data is the data associated with the attribute.


   attRenddata attRenddata Att_Attribute_Seq   


   LVL_ATTACHMENT attRenddata    sizeof(RENDDATA) renddata checksum

Renddata is the data associated with the RENDDATA structure that contains the rendering information for the corresponding attachment. The RENDDATA structure is defined in the TNEF.H header file.


   Att_Attribute Att_Attribute Att_Attribute_Seq   


   LVL_ATTACHMENT attribute-ID attribute-length attribute-data checksum

Attribute-ID, attribute-length, and attribute-data have the same meanings as for the Msg_Attribute item.