Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions include/MAPIDefS.h
Original file line number Diff line number Diff line change
Expand Up @@ -2845,6 +2845,19 @@ DECLARE_MAPI_INTERFACE_(IMAPIProviderShutdown, IUnknown)
MAPI_IMAPIPROVIDERSHUTDOWN_METHODS(PURE)
};

/* WrapCompressedRTFStreamEx ---------------------------------------------- */

/* Flags for WrapCompressedRTFStreamEx */

/****** MAPI_MODIFY ((ULONG) 0x00000001) above */
/****** STORE_UNCOMPRESSED_RTF ((ULONG) 0x00008000) above */
#define MAPI_NATIVE_BODY 0x00010000

/* out param type infomation for WrapCompressedRTFStreamEx */
#define MAPI_NATIVE_BODY_TYPE_RTF 0x00000001
#define MAPI_NATIVE_BODY_TYPE_HTML 0x00000002
#define MAPI_NATIVE_BODY_TYPE_PLAINTEXT 0x00000004

#ifdef __cplusplus
} /* extern "C" */
#endif
Expand Down
38 changes: 38 additions & 0 deletions include/MAPIUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,44 @@ HrIStorageFromStream (LPUNKNOWN lpUnkIn,
STDAPI_(SCODE) ScInitMapiUtil(ULONG ulFlags);
STDAPI_(VOID) DeinitMapiUtil(VOID);

// Definitions for WrapCompressedRTFStreamEx in param for WrapCompressedRTFStreamEX
// https://learn.microsoft.com/en-us/previous-versions/office/developer/office-2007/bb905293(v=office.12)
struct RTF_WCSINFO
{
ULONG size; // Size of the structure
ULONG ulFlags;
/****** MAPI_MODIFY ((ULONG) 0x00000001) above */
/****** STORE_UNCOMPRESSED_RTF ((ULONG) 0x00008000) above */
/****** MAPI_NATIVE_BODY ((ULONG) 0x00010000) mapidefs.h Only used for reading*/
ULONG ulInCodePage; // Codepage of the message, used when passing MAPI_NATIVE_BODY, ignored otherwise
ULONG ulOutCodePage; // Codepage of the Returned Stream, used when passing MAPI_NATIVE_BODY, ignored otherwise
};

// out param type information for WrapCompressedRTFStreamEX
// https://learn.microsoft.com/en-us/previous-versions/office/developer/office-2007/bb905294(v=office.12)
struct RTF_WCSRETINFO
{
ULONG size; // Size of the structure
ULONG ulStreamFlags;
/****** MAPI_NATIVE_BODY_TYPE_RTF ((ULONG) 0x00000001) mapidefs.h */
/****** MAPI_NATIVE_BODY_TYPE_HTML ((ULONG) 0x00000002) mapidefs.h */
/****** MAPI_NATIVE_BODY_TYPE_PLAINTEXT ((ULONG) 0x00000004) mapidefs.h */
};

STDAPI_(HRESULT)
WrapCompressedRTFStreamEx(
LPSTREAM pCompressedRTFStream,
const RTF_WCSINFO* pWCSInfo,
LPSTREAM* ppUncompressedRTFStream,
RTF_WCSRETINFO* pRetInfo);

_Check_return_ STDAPI OpenStreamOnFileW(
_In_ LPALLOCATEBUFFER lpAllocateBuffer,
_In_ LPFREEBUFFER lpFreeBuffer,
ULONG ulFlags,
_In_z_ LPCWSTR lpszFileName,
_In_opt_z_ LPCWSTR lpszPrefix,
_Out_ LPSTREAM FAR* lppStream);

/*
* Entry point names.
Expand Down
6 changes: 2 additions & 4 deletions library/mapiStubLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@

struct MAPIOFFLINE_CREATEINFO;
struct IMAPIOfflineMgr;
struct RTF_WCSINFO;
struct RTF_WCSRETINFO;

#define LINKAGE_EXTERN_C extern "C"
#define LINKAGE_NO_EXTERN_C /* */
Expand Down Expand Up @@ -2512,8 +2510,8 @@ DEFINE_STUB_FUNCTION_6(
LPALLOCATEBUFFER,
LPFREEBUFFER,
ULONG,
LPWSTR,
LPWSTR,
LPCWSTR,
LPCWSTR,
LPSTREAM FAR*,
MAPI_E_CALL_FAILED)

Expand Down
Loading