The ITnef::OpenTaggedBody method opens a stream interface on the text of an encapsulated message.
See ITnef : IUnknown.
HRESULT OpenTaggedBody(
LPMESSAGE lpMessage,
ULONG ulFlags,
LPSTREAM FAR * lppStream
);
Transport providers, message store providers, and gateways call the ITnef::OpenTaggedBody method to open a stream interface on the text of an encapsulated message — that is, on a TNEF object.
As part of its processing, OpenTaggedBody either inserts or parses attachment tags that indicate the position of any attachments or OLE objects within the message text. The attachment tags are in the following format:
[[ attachment name : n in attachment container name ]]
where attachment name describes the attachment object; n is a number identifying the attachment that is part of a sequence, incrementing from the value passed in the lpKey parameter of the OpenTnefStream or OpenTnefStreamEx function; and attachment container name describes the physical component where the attachment object resides.
OpenTaggedBody reads out message text and inserts an attachment tag wherever an attachment object originally appeared in the text. The original message text is not changed.
When a message that has tags is passed to a stream, the tags are stripped out and the attachment objects are relocated in the position of the tags in the stream.
OpenTnefStream, OpenTnefStreamEx, PR_BODY