1 /**
2  * This file has no copyright assigned and is placed in the Public Domain.
3  * This file is part of the mingw-w64 runtime package.
4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5  */
6 #ifndef MAPIHOOK_H
7 #define MAPIHOOK_H
8 
9 #include <mapidefs.h>
10 #include <mapicode.h>
11 #include <mapiguid.h>
12 #include <mapitags.h>
13 
14 #ifndef BEGIN_INTERFACE
15 #define BEGIN_INTERFACE
16 #endif
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 #define HOOK_DELETE ((ULONG) 0x00000001)
23 #define HOOK_CANCEL ((ULONG) 0x00000002)
24 
25 #define MAPI_ISPOOLERHOOK_METHODS(IPURE) MAPIMETHOD(InboundMsgHook) (THIS_ LPMESSAGE lpMessage,LPMAPIFOLDER lpFolder,LPMDB lpMDB,ULONG *lpulFlags,ULONG *lpcbEntryID,LPBYTE *lppEntryID) IPURE; MAPIMETHOD(OutboundMsgHook) (THIS_ LPMESSAGE lpMessage,LPMAPIFOLDER lpFolder,LPMDB lpMDB,ULONG *lpulFlags,ULONG *lpcbEntryID,LPBYTE *lppEntryID) IPURE;
26 #undef INTERFACE
27 #define INTERFACE ISpoolerHook
DECLARE_MAPI_INTERFACE_(ISpoolerHook,IUnknown)28   DECLARE_MAPI_INTERFACE_(ISpoolerHook,IUnknown) {
29     BEGIN_INTERFACE
30       MAPI_IUNKNOWN_METHODS(PURE)
31       MAPI_ISPOOLERHOOK_METHODS(PURE)
32   };
33 
34   DECLARE_MAPI_INTERFACE_PTR(ISpoolerHook,LPSPOOLERHOOK);
35 
36 #define HOOK_INBOUND ((ULONG) 0x00000200)
37 #define HOOK_OUTBOUND ((ULONG) 0x00000400)
38 
39   typedef HRESULT (__cdecl HPPROVIDERINIT)(LPMAPISESSION lpSession,HINSTANCE hInstance,LPALLOCATEBUFFER lpAllocateBuffer,LPALLOCATEMORE lpAllocateMore,LPFREEBUFFER lpFreeBuffer,LPMAPIUID lpSectionUID,ULONG ulFlags,LPSPOOLERHOOK *lppSpoolerHook);
40 
41   HPPROVIDERINIT HPProviderInit;
42 
43 #ifdef __cplusplus
44 }
45 #endif
46 #endif
47