lzfu.c File Reference

Compressed RTF related functions. More...

#include "libmapi/libmapi.h"
#include "libmapi/libmapi_private.h"
#include <ctype.h>

Functions

_PUBLIC_ enum MAPISTATUS WrapCompressedRTFStream (mapi_object_t *obj_stream, DATA_BLOB *rtf)
 

Detailed Description

Compressed RTF related functions.

Function Documentation

_PUBLIC_ enum MAPISTATUS WrapCompressedRTFStream ( mapi_object_t *  obj_stream,
DATA_BLOB *  rtf 
)

creates a DATA_BLOB in uncompressed Rich Text Format (RTF) from the compressed format used in the PR_RTF_COMPRESSED property opened in the stream.

Parameters
obj_streamstream object with RTF stream content
rtfthe output blob with uncompressed content
Returns
MAPI_E_SUCCESS on success, otherwise MAPI error. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_stream is not a valid pointer
  • MAPI_E_CORRUPT_DATA: a problem was encountered while decompressing the RTF compressed data
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
Note
Developers may also call GetLastError() to retrieve the last MAPI error code.
rtf->data needs to be freed with MAPIFreeBuffer
See also
OpenStream

References GetLastError(), mapi_object_get_session(), and ReadStream().


Creative Commons License
Creative Commons Attribution icon Creative Commons Share Alike icon
This content is licensed under the Creative Commons
Attribution ShareAlike License v. 3.0:
http://creativecommons.org/licenses/by-sa/3.0/