home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / mapihook.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  3KB  |  84 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.  
  12. #ifndef MAPIDEFS_H
  13. #include <mapidefs.h>
  14. #include <mapicode.h>
  15. #include <mapiguid.h>
  16. #include <mapitags.h>
  17. #endif
  18.  
  19. #ifndef BEGIN_INTERFACE
  20. #define BEGIN_INTERFACE
  21. #endif
  22.  
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26.  
  27. /* ISpoolerHook Interface ------------------------------------------------ */
  28.  
  29. /* MsgHooks */
  30.  
  31. #define HOOK_DELETE         ((ULONG) 0x00000001)
  32. #define HOOK_CANCEL         ((ULONG) 0x00000002)
  33.  
  34. #define MAPI_ISPOOLERHOOK_METHODS(IPURE)                            \
  35.     MAPIMETHOD(InboundMsgHook)                                      \
  36.         (THIS_  LPMESSAGE                   lpMessage,              \
  37.                 LPMAPIFOLDER                lpFolder,               \
  38.                 LPMDB                       lpMDB,                  \
  39.                 ULONG FAR *                 lpulFlags,              \
  40.                 ULONG FAR *                 lpcbEntryID,            \
  41.                 LPBYTE FAR *                lppEntryID) IPURE;      \
  42.     MAPIMETHOD(OutboundMsgHook)                                     \
  43.         (THIS_  LPMESSAGE                   lpMessage,              \
  44.                 LPMAPIFOLDER                lpFolder,               \
  45.                 LPMDB                       lpMDB,                  \
  46.                 ULONG FAR *                 lpulFlags,              \
  47.                 ULONG FAR *                 lpcbEntryID,            \
  48.                 LPBYTE FAR *                lppEntryID) IPURE;      \
  49.     
  50. #undef       INTERFACE
  51. #define      INTERFACE  ISpoolerHook
  52. DECLARE_MAPI_INTERFACE_(ISpoolerHook, IUnknown)
  53. {
  54.     BEGIN_INTERFACE 
  55.     MAPI_IUNKNOWN_METHODS(PURE)
  56.     MAPI_ISPOOLERHOOK_METHODS(PURE)
  57. };
  58.  
  59. DECLARE_MAPI_INTERFACE_PTR(ISpoolerHook, LPSPOOLERHOOK);
  60.  
  61. /* Hook Provider Entry Point */
  62.  
  63. #define HOOK_INBOUND        ((ULONG) 0x00000200)
  64. #define HOOK_OUTBOUND       ((ULONG) 0x00000400)
  65.  
  66. typedef HRESULT (STDMAPIINITCALLTYPE HPPROVIDERINIT)(
  67.     LPMAPISESSION           lpSession,
  68.     HINSTANCE               hInstance,
  69.     LPALLOCATEBUFFER        lpAllocateBuffer,
  70.     LPALLOCATEMORE          lpAllocateMore,
  71.     LPFREEBUFFER            lpFreeBuffer,
  72.     LPMAPIUID               lpSectionUID,
  73.     ULONG                   ulFlags,
  74.     LPSPOOLERHOOK FAR *     lppSpoolerHook
  75. );
  76.  
  77. HPPROVIDERINIT HPProviderInit;
  78.  
  79. #ifdef __cplusplus
  80. }      /* extern "C"  */
  81. #endif /* __cplusplus */
  82.  
  83. #endif /* MAPIHOOK_H  */
  84.