home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / mapihook.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  2.7 KB  |  86 lines

  1. /*
  2.  *  M A P I H O O K . H
  3.  *
  4.  *  Defines the SpoolerMsgHook provider interface.
  5.  *
  6.  *  Copyright 1986-1996 Microsoft Corporation. All Rights Reserved.
  7.  */
  8.  
  9. #ifndef MAPIHOOK_H
  10. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  11. #define MAPIHOOK_H
  12.  
  13. #ifndef MAPIDEFS_H
  14. #include <mapidefs.h>
  15. #include <mapicode.h>
  16. #include <mapiguid.h>
  17. #include <mapitags.h>
  18. #endif
  19.  
  20. #ifndef BEGIN_INTERFACE
  21. #define BEGIN_INTERFACE
  22. #endif
  23.  
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27.  
  28. /* ISpoolerHook Interface ------------------------------------------------ */
  29.  
  30. /* MsgHooks */
  31.  
  32. #define HOOK_DELETE         ((ULONG) 0x00000001)
  33. #define HOOK_CANCEL         ((ULONG) 0x00000002)
  34.  
  35. #define MAPI_ISPOOLERHOOK_METHODS(IPURE)                            \
  36.     MAPIMETHOD(InboundMsgHook)                                      \
  37.         (THIS_  LPMESSAGE                   lpMessage,              \
  38.                 LPMAPIFOLDER                lpFolder,               \
  39.                 LPMDB                       lpMDB,                  \
  40.                 ULONG FAR *                 lpulFlags,              \
  41.                 ULONG FAR *                 lpcbEntryID,            \
  42.                 LPBYTE FAR *                lppEntryID) IPURE;      \
  43.     MAPIMETHOD(OutboundMsgHook)                                     \
  44.         (THIS_  LPMESSAGE                   lpMessage,              \
  45.                 LPMAPIFOLDER                lpFolder,               \
  46.                 LPMDB                       lpMDB,                  \
  47.                 ULONG FAR *                 lpulFlags,              \
  48.                 ULONG FAR *                 lpcbEntryID,            \
  49.                 LPBYTE FAR *                lppEntryID) IPURE;      \
  50.     
  51. #undef       INTERFACE
  52. #define      INTERFACE  ISpoolerHook
  53. DECLARE_MAPI_INTERFACE_(ISpoolerHook, IUnknown)
  54. {
  55.     BEGIN_INTERFACE 
  56.     MAPI_IUNKNOWN_METHODS(PURE)
  57.     MAPI_ISPOOLERHOOK_METHODS(PURE)
  58. };
  59.  
  60. DECLARE_MAPI_INTERFACE_PTR(ISpoolerHook, LPSPOOLERHOOK);
  61.  
  62. /* Hook Provider Entry Point */
  63.  
  64. #define HOOK_INBOUND        ((ULONG) 0x00000200)
  65. #define HOOK_OUTBOUND       ((ULONG) 0x00000400)
  66.  
  67. typedef HRESULT (STDMAPIINITCALLTYPE HPPROVIDERINIT)(
  68.     LPMAPISESSION           lpSession,
  69.     HINSTANCE               hInstance,
  70.     LPALLOCATEBUFFER        lpAllocateBuffer,
  71.     LPALLOCATEMORE          lpAllocateMore,
  72.     LPFREEBUFFER            lpFreeBuffer,
  73.     LPMAPIUID               lpSectionUID,
  74.     ULONG                   ulFlags,
  75.     LPSPOOLERHOOK FAR *     lppSpoolerHook
  76. );
  77.  
  78. HPPROVIDERINIT HPProviderInit;
  79.  
  80. #ifdef __cplusplus
  81. }      /* extern "C"  */
  82. #endif /* __cplusplus */
  83.  
  84. #pragma option pop /*P_O_Pop*/
  85. #endif /* MAPIHOOK_H  */
  86.