Skip to content

Commit 8968fcf

Browse files
Merge pull request #121 from amtopel/Add-missing-declarations
Request to add some missing declarations
2 parents 9f41d04 + 4edd27e commit 8968fcf

File tree

3 files changed

+53
-4
lines changed

3 files changed

+53
-4
lines changed

include/MAPIDefS.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2845,6 +2845,19 @@ DECLARE_MAPI_INTERFACE_(IMAPIProviderShutdown, IUnknown)
28452845
MAPI_IMAPIPROVIDERSHUTDOWN_METHODS(PURE)
28462846
};
28472847

2848+
/* WrapCompressedRTFStreamEx ---------------------------------------------- */
2849+
2850+
/* Flags for WrapCompressedRTFStreamEx */
2851+
2852+
/****** MAPI_MODIFY ((ULONG) 0x00000001) above */
2853+
/****** STORE_UNCOMPRESSED_RTF ((ULONG) 0x00008000) above */
2854+
#define MAPI_NATIVE_BODY 0x00010000
2855+
2856+
/* out param type infomation for WrapCompressedRTFStreamEx */
2857+
#define MAPI_NATIVE_BODY_TYPE_RTF 0x00000001
2858+
#define MAPI_NATIVE_BODY_TYPE_HTML 0x00000002
2859+
#define MAPI_NATIVE_BODY_TYPE_PLAINTEXT 0x00000004
2860+
28482861
#ifdef __cplusplus
28492862
} /* extern "C" */
28502863
#endif

include/MAPIUtil.h

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,44 @@ HrIStorageFromStream (LPUNKNOWN lpUnkIn,
846846
STDAPI_(SCODE) ScInitMapiUtil(ULONG ulFlags);
847847
STDAPI_(VOID) DeinitMapiUtil(VOID);
848848

849+
// Definitions for WrapCompressedRTFStreamEx in param for WrapCompressedRTFStreamEX
850+
// https://learn.microsoft.com/en-us/previous-versions/office/developer/office-2007/bb905293(v=office.12)
851+
struct RTF_WCSINFO
852+
{
853+
ULONG size; // Size of the structure
854+
ULONG ulFlags;
855+
/****** MAPI_MODIFY ((ULONG) 0x00000001) above */
856+
/****** STORE_UNCOMPRESSED_RTF ((ULONG) 0x00008000) above */
857+
/****** MAPI_NATIVE_BODY ((ULONG) 0x00010000) mapidefs.h Only used for reading*/
858+
ULONG ulInCodePage; // Codepage of the message, used when passing MAPI_NATIVE_BODY, ignored otherwise
859+
ULONG ulOutCodePage; // Codepage of the Returned Stream, used when passing MAPI_NATIVE_BODY, ignored otherwise
860+
};
861+
862+
// out param type information for WrapCompressedRTFStreamEX
863+
// https://learn.microsoft.com/en-us/previous-versions/office/developer/office-2007/bb905294(v=office.12)
864+
struct RTF_WCSRETINFO
865+
{
866+
ULONG size; // Size of the structure
867+
ULONG ulStreamFlags;
868+
/****** MAPI_NATIVE_BODY_TYPE_RTF ((ULONG) 0x00000001) mapidefs.h */
869+
/****** MAPI_NATIVE_BODY_TYPE_HTML ((ULONG) 0x00000002) mapidefs.h */
870+
/****** MAPI_NATIVE_BODY_TYPE_PLAINTEXT ((ULONG) 0x00000004) mapidefs.h */
871+
};
872+
873+
STDAPI_(HRESULT)
874+
WrapCompressedRTFStreamEx(
875+
LPSTREAM pCompressedRTFStream,
876+
const RTF_WCSINFO* pWCSInfo,
877+
LPSTREAM* ppUncompressedRTFStream,
878+
RTF_WCSRETINFO* pRetInfo);
879+
880+
_Check_return_ STDAPI OpenStreamOnFileW(
881+
_In_ LPALLOCATEBUFFER lpAllocateBuffer,
882+
_In_ LPFREEBUFFER lpFreeBuffer,
883+
ULONG ulFlags,
884+
_In_z_ LPCWSTR lpszFileName,
885+
_In_opt_z_ LPCWSTR lpszPrefix,
886+
_Out_ LPSTREAM FAR* lppStream);
849887

850888
/*
851889
* Entry point names.

library/mapiStubLibrary.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@
5353

5454
struct MAPIOFFLINE_CREATEINFO;
5555
struct IMAPIOfflineMgr;
56-
struct RTF_WCSINFO;
57-
struct RTF_WCSRETINFO;
5856

5957
#define LINKAGE_EXTERN_C extern "C"
6058
#define LINKAGE_NO_EXTERN_C /* */
@@ -2512,8 +2510,8 @@ DEFINE_STUB_FUNCTION_6(
25122510
LPALLOCATEBUFFER,
25132511
LPFREEBUFFER,
25142512
ULONG,
2515-
LPWSTR,
2516-
LPWSTR,
2513+
LPCWSTR,
2514+
LPCWSTR,
25172515
LPSTREAM FAR*,
25182516
MAPI_E_CALL_FAILED)
25192517

0 commit comments

Comments
 (0)