Expand Minimize
This topic has not yet been rated - Rate this topic

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.

Exported by:

msmapi32.dll

Called by:

Client

Implemented by:

Outlook

HRESULT __stdcall WrapCompressedRTFStreamEx( 
    LPSTREAM            lpCompressedRTFStream, 
    CONST RTF_WCSINFO   *pWCSInfo, 
    LPSTREAM            *lppUncompressedRTFStream, 
    RTF_WCSRETINFO      *pRetInfo); 

lpCompressedRTFStream

[in] This is a pointer to a stream that is opened on the PidTagRtfCompressed Canonical Property of a message.

pWCSInfo

[in] This is a pointer to a

RTF_WCSINFO structure that contains options for the function.

lppUncompressedRTFStream

[out] This is a pointer to the location where a stream for the decompressed RTF is returned.

pRetInfo

[out] This is a pointer to a RTF_WCSRETINFO structure that contains information about the format of the returned decompressed stream.

S_OK

  • The function call is successful.

MAPI_E_INVALID_PARAMETER

  • This is returned if the MAPI_NATIVE_BODY flag is combined with the MAPI_MODIFY flag in the ulFlags field of the RTF_WCSINFO structure pointed at by pWCSInfo.

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.

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.