home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / RTLWIN32.PAK / MAPIHOOK.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  3.0 KB  |  106 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. #define MAPIHOOK_H
  11. #pragma option -b
  12.  
  13. #ifndef MAPIDEFS_H
  14. #pragma option -b.
  15. #include <mapidefs.h>
  16. #pragma option -b
  17. #pragma option -b.
  18. #include <mapicode.h>
  19. #pragma option -b
  20. #pragma option -b.
  21. #include <mapiguid.h>
  22. #pragma option -b
  23. #pragma option -b.
  24. #include <mapitags.h>
  25. #pragma option -b
  26. #endif
  27.  
  28. #if defined (__BORLANDC__)
  29. #pragma option -b.
  30.   #include <pshpack8.h>
  31. #pragma option -b
  32. #endif
  33.  
  34. #ifndef BEGIN_INTERFACE
  35. #define BEGIN_INTERFACE
  36. #endif
  37.  
  38. #ifdef __cplusplus
  39. extern "C" {
  40. #endif
  41.  
  42. /* ISpoolerHook Interface ------------------------------------------------ */
  43.  
  44. /* MsgHooks */
  45.  
  46. #define HOOK_DELETE         ((ULONG) 0x00000001)
  47. #define HOOK_CANCEL         ((ULONG) 0x00000002)
  48.  
  49. #define MAPI_ISPOOLERHOOK_METHODS(IPURE)                            \
  50.     MAPIMETHOD(InboundMsgHook)                                      \
  51.         (THIS_  LPMESSAGE                   lpMessage,              \
  52.                 LPMAPIFOLDER                lpFolder,               \
  53.                 LPMDB                       lpMDB,                  \
  54.                 ULONG FAR *                 lpulFlags,              \
  55.                 ULONG FAR *                 lpcbEntryID,            \
  56.                 LPBYTE FAR *                lppEntryID) IPURE;      \
  57.     MAPIMETHOD(OutboundMsgHook)                                     \
  58.         (THIS_  LPMESSAGE                   lpMessage,              \
  59.                 LPMAPIFOLDER                lpFolder,               \
  60.                 LPMDB                       lpMDB,                  \
  61.                 ULONG FAR *                 lpulFlags,              \
  62.                 ULONG FAR *                 lpcbEntryID,            \
  63.                 LPBYTE FAR *                lppEntryID) IPURE;      \
  64.     
  65. #undef       INTERFACE
  66. #define      INTERFACE  ISpoolerHook
  67. DECLARE_MAPI_INTERFACE_(ISpoolerHook, IUnknown)
  68. {
  69.     BEGIN_INTERFACE 
  70.     MAPI_IUNKNOWN_METHODS(PURE)
  71.     MAPI_ISPOOLERHOOK_METHODS(PURE)
  72. };
  73.  
  74. DECLARE_MAPI_INTERFACE_PTR(ISpoolerHook, LPSPOOLERHOOK);
  75.  
  76. /* Hook Provider Entry Point */
  77.  
  78. #define HOOK_INBOUND        ((ULONG) 0x00000200)
  79. #define HOOK_OUTBOUND       ((ULONG) 0x00000400)
  80.  
  81. typedef HRESULT (STDMAPIINITCALLTYPE HPPROVIDERINIT)(
  82.     LPMAPISESSION           lpSession,
  83.     HINSTANCE               hInstance,
  84.     LPALLOCATEBUFFER        lpAllocateBuffer,
  85.     LPALLOCATEMORE          lpAllocateMore,
  86.     LPFREEBUFFER            lpFreeBuffer,
  87.     LPMAPIUID               lpSectionUID,
  88.     ULONG                   ulFlags,
  89.     LPSPOOLERHOOK FAR *     lppSpoolerHook
  90. );
  91.  
  92. HPPROVIDERINIT HPProviderInit;
  93.  
  94. #ifdef __cplusplus
  95. }      /* extern "C"  */
  96. #endif /* __cplusplus */
  97.  
  98. #if defined (__BORLANDC__)
  99. #pragma option -b.
  100.   #include <poppack.h>
  101. #pragma option -b
  102. #endif
  103.  
  104. #pragma option -b.
  105. #endif /* MAPIHOOK_H  */
  106.