WrapCompressedRTFStreamEx
Collapse the table of content
Expand the table of content
The document is archived and information here might be outdated

WrapCompressedRTFStreamEx

Office 2007

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.

Quick Info

Exported by:msmapi32.dll
Called by:Client
Implemented by:Outlook
HRESULT __stdcall WrapCompressedRTFStreamEx(
    LPSTREAM            lpCompressedRTFStream,
    CONST RTF_WCSINFO   *pWCSInfo,
    LPSTREAM            *lppUncompressedRTFStream,
    RTF_WCSRETINFO      *pRetInfo);

Parameters

lpCompressedRTFStream

[in] This is a pointer to a stream that is opened on the PR_RTF_COMPRESSED 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.

Return Values

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.

Remarks

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 BodyFormat property 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.

See Also

Constants for Exported Outlook APIs
How to: Retrieve the Body of a Message in Compressed RTF and Convert It to Its Native Format


Show:
© 2016 Microsoft