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