mapihook.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. #include <mapidefs.h>
  9. #include <mapicode.h>
  10. #include <mapiguid.h>
  11. #include <mapitags.h>
  12. #ifndef BEGIN_INTERFACE
  13. #define BEGIN_INTERFACE
  14. #endif
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. #define HOOK_DELETE ((ULONG) 0x00000001)
  19. #define HOOK_CANCEL ((ULONG) 0x00000002)
  20. #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;
  21. #undef INTERFACE
  22. #define INTERFACE ISpoolerHook
  23. DECLARE_MAPI_INTERFACE_(ISpoolerHook,IUnknown) {
  24. BEGIN_INTERFACE
  25. MAPI_IUNKNOWN_METHODS(PURE)
  26. MAPI_ISPOOLERHOOK_METHODS(PURE)
  27. };
  28. DECLARE_MAPI_INTERFACE_PTR(ISpoolerHook,LPSPOOLERHOOK);
  29. #define HOOK_INBOUND ((ULONG) 0x00000200)
  30. #define HOOK_OUTBOUND ((ULONG) 0x00000400)
  31. typedef HRESULT (__cdecl HPPROVIDERINIT)(LPMAPISESSION lpSession,HINSTANCE hInstance,LPALLOCATEBUFFER lpAllocateBuffer,LPALLOCATEMORE lpAllocateMore,LPFREEBUFFER lpFreeBuffer,LPMAPIUID lpSectionUID,ULONG ulFlags,LPSPOOLERHOOK *lppSpoolerHook);
  32. HPPROVIDERINIT HPProviderInit;
  33. #ifdef __cplusplus
  34. }
  35. #endif
  36. #endif