home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / Borland / Cplus45 / BC45 / MSINC.PAK / MAPIHOOK.H < prev    next >
C/C++ Source or Header  |  1995-08-29  |  3KB  |  91 lines

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