WrapCompressedRTFStreamEx
Published: July 16, 2012
Decompresses the the body of an e-mail message that is in compressed Rich Text Format (RTF), indicates the format of the decompressed stream, optionally converts the decompressed stream to its native format, and returns either the decompressed stream or the converted native stream.
WrapCompressedRTFStreamEx allows you to access the body of an e-mail message encapsulated in compressed RTF by decompressing the stream, returns the decompressed stream and its format, and optionally the native body stream. The native body stream can be in RTF, plain text, or HTML.
The Microsoft Office Outlook object model provides a Body property for MailItem objects and a MailItem.BodyFormat Property (Outlook) that indicates the format of the body text. By design, a solution that is not trusted by Outlook invokes security dialog boxes generated by the Outlook Security Guard. Using the exported MAPI function WrapCompressedRTFStreamEx allows a solution to use MAPI instead of the Outlook object model and avoid these security dialog boxes.
Because the MAPI_NATIVE_BODY flag cannot be combined with the MAPI_MODIFY flag in the ulFlags field of the RTF_WCSINFO structure pointed at by pWCSInfo, you can only access the native body stream in read-only mode. To access the native body stream in read/write mode, you should use the WrapCompressedRTFStream function.