home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / bc45 / msinc.pak / EXCHEXT.H < prev    next >
C/C++ Source or Header  |  1997-07-23  |  30KB  |  794 lines

  1. #ifndef EXCHEXT_H
  2. #define EXCHEXT_H
  3.  
  4.  
  5. /*
  6.  *  E X C H E X T . H
  7.  *
  8.  *  Declarations of interfaces for providers of Microsoft Exchange
  9.  *  client extensions.
  10.  *
  11.  *  Copyright 1993-1995 Microsoft Corporation. All Rights Reserved.
  12.  */
  13.  
  14.  
  15. #ifndef BEGIN_INTERFACE
  16. #define BEGIN_INTERFACE
  17. #endif
  18.  
  19. #ifdef __BORLANDC__
  20.   #include <pshpack8.h>
  21. #endif
  22.  
  23. /*
  24.  *  C o n s t a n t s
  25.  */
  26.  
  27.  
  28. // SCODEs
  29. #define EXCHEXT_S_NOCRITERIA    MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 1)
  30. #define EXCHEXT_S_NOCHANGE      MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_ITF, 2)
  31.  
  32. // Flag for Unicode strings
  33. #define EXCHEXT_UNICODE                 (0x80000000)
  34.  
  35. // Flag values for IExchExtCallback::GetVersion
  36. #define EECBGV_GETBUILDVERSION          (0x00000001)
  37. #define EECBGV_GETACTUALVERSION         (0x00000002)
  38. #define EECBGV_GETVIRTUALVERSION        (0x00000004)
  39.  
  40. // Build version value for IExchExtCallback::GetVersion
  41. #define EECBGV_BUILDVERSION_MAJOR       (0x000d0000)
  42. #define EECBGV_BUILDVERSION_MAJOR_MASK  (0xFFFF0000)
  43. #define EECBGV_BUILDVERSION_MINOR_MASK  (0x0000FFFF)
  44.  
  45. // Actual/Virtual version values for IExchExtCallback::GetVersion
  46. #define EECBGV_MSEXCHANGE_WIN31         (0x01010000)
  47. #define EECBGV_MSEXCHANGE_WIN95         (0x01020000)
  48. #define EECBGV_MSEXCHANGE_WINNT         (0x01030000)
  49. #define EECBGV_VERSION_PRODUCT_MASK     (0xFF000000)
  50. #define EECBGV_VERSION_PLATFORM_MASK    (0x00FF0000)
  51. #define EECBGV_VERSION_MAJOR_MASK       (0x0000FF00)
  52. #define EECBGV_VERSION_MINOR_MASK       (0x000000FF)
  53.  
  54. // Flag values for IExchExtCallback::GetMenuPos
  55. #define EECBGMP_RANGE                   (0x00000001)
  56.  
  57. // Flag values for IExchExtCallback::GetNewMessageSite
  58. #define EECBGNMS_MODAL                  (0x00000001)
  59.  
  60. // Flag values for IExchExtCallback::ChooseFolder
  61. #define EECBCF_GETNAME                  (0x00000001)
  62. #define EECBCF_HIDENEW                  (0x00000002)
  63. #define EECBCF_PREVENTROOT              (0x00000004)
  64.  
  65. // Extensibility contexts used with IExchExt::Install
  66. #define EECONTEXT_SESSION               (0x00000001)
  67. #define EECONTEXT_VIEWER                (0x00000002)
  68. #define EECONTEXT_REMOTEVIEWER          (0x00000003)
  69. #define EECONTEXT_SEARCHVIEWER          (0x00000004)
  70. #define EECONTEXT_ADDRBOOK              (0x00000005)
  71. #define EECONTEXT_SENDNOTEMESSAGE       (0x00000006)
  72. #define EECONTEXT_READNOTEMESSAGE       (0x00000007)
  73. #define EECONTEXT_SENDPOSTMESSAGE       (0x00000008)
  74. #define EECONTEXT_READPOSTMESSAGE       (0x00000009)
  75. #define EECONTEXT_READREPORTMESSAGE     (0x0000000A)
  76. #define EECONTEXT_SENDRESENDMESSAGE     (0x0000000B)
  77. #define EECONTEXT_PROPERTYSHEETS        (0x0000000C)
  78. #define EECONTEXT_ADVANCEDCRITERIA      (0x0000000D)
  79. #define EECONTEXT_TASK                  (0x0000000E)
  80.  
  81. // Flag values for IExchExt::Install
  82. #define EE_MODAL                        (0x00000001)
  83.  
  84. // Toolbar ids used with IExchExtCommands::InstallCommands
  85. #define EETBID_STANDARD                 (0x00000001)
  86.  
  87. // Flag values for IExchExtCommands::QueryHelpText
  88. #define EECQHT_STATUS                   (0x00000001)
  89. #define EECQHT_TOOLTIP                  (0x00000002)
  90.  
  91. // Flag values for IExchExtMessageEvents::OnXComplete
  92. #define EEME_FAILED                     (0x00000001)
  93. #define EEME_COMPLETE_FAILED            (0x00000002)
  94.  
  95. // Flag values for IExchExtAttachedFileEvents::OpenSzFile
  96. #define EEAFE_OPEN                      (0x00000001)
  97. #define EEAFE_PRINT                     (0x00000002)
  98. #define EEAFE_QUICKVIEW                 (0x00000003)
  99.  
  100. // Flag values for IExchExtPropertySheets methods
  101. #define EEPS_MESSAGE                    (0x00000001)
  102. #define EEPS_FOLDER                     (0x00000002)
  103. #define EEPS_STORE                      (0x00000003)
  104. #define EEPS_TOOLSOPTIONS               (0x00000004)
  105.  
  106. // Flag values for IExchExtAdvancedCriteria::Install and ::SetFolder
  107. #define EEAC_INCLUDESUBFOLDERS          (0x00000001)
  108.  
  109.  
  110. /*
  111.  *  S t r u c t u r e s
  112.  */
  113.  
  114.  
  115. // Hook procedure for IExchExtCallback::ChooseFolder
  116. typedef UINT (STDAPICALLTYPE FAR * LPEECFHOOKPROC)(HWND, UINT, WPARAM, LPARAM);
  117.  
  118. // Dialog information for IExchExtCallback::ChooseFolder
  119. typedef struct
  120. {
  121.     UINT cbLength;
  122.     HWND hwnd;
  123.     LPTSTR szCaption;
  124.     LPTSTR szLabel;
  125.     LPTSTR szHelpFile;
  126.     ULONG ulHelpID;
  127.     HINSTANCE hinst;
  128.     UINT uiDlgID;
  129.     LPEECFHOOKPROC lpeecfhp;
  130.     DWORD dwHookData;
  131.     ULONG ulFlags;
  132.     LPMDB pmdb;
  133.     LPMAPIFOLDER pfld;
  134.     LPTSTR szName;
  135.     DWORD dwReserved1;
  136.     DWORD dwReserved2;
  137.     DWORD dwReserved3;
  138. }
  139. EXCHEXTCHOOSEFOLDER, FAR * LPEXCHEXTCHOOSEFOLDER;
  140.  
  141. // Toolbar list entries for IExchExtCommands::InstallCommands
  142. typedef struct
  143. {
  144.     HWND hwnd;
  145.     ULONG tbid;
  146.     ULONG ulFlags;
  147.     UINT itbbBase;
  148. }
  149. TBENTRY, FAR * LPTBENTRY;
  150.  
  151.  
  152. /*
  153.  *  E x t e r n a l   T y p e s
  154.  */
  155.  
  156.  
  157. // Property sheet pages from Windows 95 prsht.h
  158. #ifndef _PRSHT_H_
  159. typedef struct _PROPSHEETPAGE;
  160. typedef struct _PROPSHEETPAGE FAR * LPPROPSHEETPAGE;
  161. #endif
  162.  
  163. // Toolbar adjust info from Windows 95 commctrl.h
  164. #ifndef _INC_COMMCTRL
  165. typedef struct _TBBUTTON;
  166. typedef struct _TBBUTTON FAR * LPTBBUTTON;
  167. #endif
  168.  
  169.  
  170. /*
  171.  *  S u p p o r t   I n t e r f a c e s
  172.  */
  173.  
  174.  
  175. // Forward reference
  176. #ifdef __cplusplus
  177. interface IExchExtModeless;
  178. #else
  179. typedef interface IExchExtModeless IExchExtModeless;
  180. #endif 
  181. typedef IExchExtModeless FAR* LPEXCHEXTMODELESS;
  182.  
  183.  
  184. /*
  185.  *  IExchExtModelessCallback
  186.  *
  187.  *  Purpose:
  188.  *      Interface which may be used by Exchange client
  189.  *      extensions that create modeless UI.
  190.  */
  191. #undef INTERFACE
  192. #define INTERFACE   IExchExtModelessCallback
  193. DECLARE_INTERFACE_(IExchExtModelessCallback, IUnknown)
  194. {
  195.     BEGIN_INTERFACE
  196.  
  197.     // *** IUnknown methods ***
  198.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  199.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  200.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  201.   
  202.     // *** IExchExtModelessCallback methods ***
  203.     STDMETHOD(EnableModeless) (THIS_ HWND hwnd, BOOL fEnable) PURE;
  204.     STDMETHOD(AddWindow) (THIS) PURE;
  205.     STDMETHOD(ReleaseWindow) (THIS) PURE;
  206. };
  207. typedef IExchExtModelessCallback FAR * LPEXCHEXTMODELESSCALLBACK;
  208.  
  209.  
  210. /*
  211.  *  IExchExtCallback
  212.  *
  213.  *  Purpose:
  214.  *      Resource interface that may be used by Exchange client extensions.
  215.  */
  216. #undef INTERFACE
  217. #define INTERFACE   IExchExtCallback
  218.  
  219. DECLARE_INTERFACE_(IExchExtCallback, IUnknown)
  220. {
  221.     BEGIN_INTERFACE
  222.  
  223.     // *** IUnknown methods ***
  224.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  225.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  226.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  227.  
  228.     // *** IExchExtCallback methods ***
  229.     STDMETHOD(GetVersion) (THIS_ ULONG FAR * lpulVersion, ULONG ulFlags) PURE;
  230.     STDMETHOD(GetWindow) (THIS_ HWND FAR * lphwnd) PURE;
  231.     STDMETHOD(GetMenu) (THIS_ HMENU FAR * lphmenu) PURE;
  232.     STDMETHOD(GetToolbar) (THIS_ ULONG tbid, HWND FAR * lphwndTb) PURE;
  233.     STDMETHOD(GetSession) (THIS_ LPMAPISESSION FAR * lppses, 
  234.                            LPADRBOOK FAR * lppab) PURE;
  235.     STDMETHOD(GetObject) (THIS_ LPMDB FAR * lppmdb, 
  236.                           LPMAPIPROP FAR * lppmp) PURE;
  237.     STDMETHOD(GetSelectionCount) (THIS_ ULONG FAR * lpceid) PURE;
  238.     STDMETHOD(GetSelectionItem) (THIS_ ULONG ieid, ULONG FAR * lpcbEid,
  239.                                  LPENTRYID FAR * lppeid, ULONG FAR * lpulType,
  240.                                  LPTSTR lpszMsgClass, ULONG cbMsgClass,
  241.                                  ULONG FAR * lpulMsgFlags, ULONG ulFlags) PURE;
  242.     STDMETHOD(GetMenuPos) (THIS_ ULONG cmdid, HMENU FAR * lphmenu,
  243.                            ULONG FAR * lpmposMin, ULONG FAR * lpmposMax,
  244.                            ULONG ulFlags) PURE;
  245.     STDMETHOD(GetSharedExtsDir) (THIS_ LPTSTR lpszDir, ULONG cchDir, 
  246.                                  ULONG ulFlags) PURE;
  247.     STDMETHOD(GetRecipients) (THIS_ LPADRLIST FAR * lppal) PURE;
  248.     STDMETHOD(SetRecipients) (THIS_ LPADRLIST lpal) PURE;
  249.     STDMETHOD(GetNewMessageSite) (THIS_ ULONG fComposeInFolder,
  250.                                   LPMAPIFOLDER pfldFocus,
  251.                                   LPPERSISTMESSAGE ppermsg,
  252.                                   LPMESSAGE FAR * ppmsg,
  253.                                   LPMAPIMESSAGESITE FAR * ppmms,
  254.                                   LPMAPIVIEWCONTEXT FAR * ppmvc,
  255.                                   ULONG ulFlags) PURE;
  256.     STDMETHOD(RegisterModeless) (THIS_ LPEXCHEXTMODELESS peem,
  257.                                  LPEXCHEXTMODELESSCALLBACK FAR * ppeemcb) PURE;
  258.     STDMETHOD(ChooseFolder) (THIS_ LPEXCHEXTCHOOSEFOLDER peecf) PURE;
  259. };
  260. typedef IExchExtCallback FAR * LPEXCHEXTCALLBACK;
  261.  
  262.  
  263. /*
  264.  *  E x t e n s i o n   I n t e r f a c e s
  265.  */
  266.  
  267.  
  268. /*
  269.  *  IExchExt
  270.  *
  271.  *  Purpose:
  272.  *      Central interface implemented by Exchange client extensions.
  273.  */
  274. #undef INTERFACE
  275. #define INTERFACE   IExchExt
  276.  
  277. DECLARE_INTERFACE_(IExchExt, IUnknown)
  278. {
  279.     BEGIN_INTERFACE
  280.  
  281.     // *** IUnknown methods ***
  282.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  283.     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  284.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  285.  
  286.     // *** IExchExt methods ***
  287.     STDMETHOD(Install) (THIS_ LPEXCHEXTCALLBACK lpeecb, 
  288.                         ULONG mecontext, ULONG ulFlags) PURE;
  289. };
  290. typedef IExchExt FAR * LPEXCHEXT;
  291.  
  292. // Type of function called by the client to load an extension
  293. typedef LPEXCHEXT (CALLBACK * LPFNEXCHEXTENTRY)(VOID);
  294.  
  295.  
  296. /*
  297.  *  IExchExtCommands
  298.  *
  299.  *  Purpose:
  300.  *      Interface implemented by Exchange client extensions that wish to
  301.  *      add additional commands to the client's menus.
  302.  */
  303. #undef INTERFACE
  304. #define INTERFACE   IExchExtCommands
  305.  
  306. DECLARE_INTERFACE_(IExchExtCommands, IUnknown)
  307. {
  308.     BEGIN_INTERFACE
  309.  
  310.     // *** IUnknown methods ***
  311.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  312.     STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  313.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  314.  
  315.     // *** IExchExtCommands methods ***
  316.     STDMETHOD(InstallCommands) (THIS_ LPEXCHEXTCALLBACK lpeecb, HWND hwnd, 
  317.                                 HMENU hmenu, UINT FAR * lpcmdidBase, 
  318.                                 LPTBENTRY lptbeArray, UINT ctbe, 
  319.                                 ULONG ulFlags) PURE;
  320.     STDMETHOD_(VOID,InitMenu) (THIS_ LPEXCHEXTCALLBACK lpeecb) PURE;
  321.     STDMETHOD(DoCommand) (THIS_ LPEXCHEXTCALLBACK lpeecb, UINT cmdid) PURE;
  322.     STDMETHOD(Help) (THIS_ LPEXCHEXTCALLBACK lpeecb, UINT cmdid) PURE;
  323.     STDMETHOD(QueryHelpText) (THIS_ UINT cmdid, ULONG ulFlags,
  324.                               LPTSTR lpsz, UINT cch) PURE;
  325.     STDMETHOD(QueryButtonInfo) (THIS_ ULONG tbid, UINT itbb, LPTBBUTTON ptbb,
  326.                                 LPTSTR lpsz, UINT cch, ULONG ulFlags) PURE;
  327.     STDMETHOD(ResetToolbar) (THIS_ ULONG tbid, ULONG ulFlags) PURE;
  328. };
  329. typedef IExchExtCommands FAR * LPEXCHEXTCOMMANDS;
  330.  
  331.  
  332. /*
  333.  *  IExchExtUserEvents
  334.  *
  335.  *  Purpose:
  336.  *      Interface implemented by Exchange client extensions that wish to
  337.  *      take special action when the user does certain actions.
  338.  */
  339. #undef INTERFACE
  340. #define INTERFACE   IExchExtUserEvents
  341.  
  342. DECLARE_INTERFACE_(IExchExtUserEvents, IUnknown)
  343. {
  344.     BEGIN_INTERFACE
  345.  
  346.     // *** IUnknown methods ***
  347.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  348.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  349.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  350.  
  351.     // *** IExchExtUserEvents methods ***
  352.     STDMETHOD_(VOID,OnSelectionChange) (THIS_ LPEXCHEXTCALLBACK lpeecb) PURE;
  353.     STDMETHOD_(VOID,OnObjectChange) (THIS_ LPEXCHEXTCALLBACK lpeecb) PURE;
  354. };
  355. typedef IExchExtUserEvents FAR * LPEXCHEXTUSEREVENTS;
  356.  
  357.  
  358. /*
  359.  *  IExchExtSessionEvents
  360.  *
  361.  *  Purpose:
  362.  *      Interface implemented by Exchange client extensions that wish to
  363.  *      take special action when certain events happen in the session.
  364.  */
  365. #undef INTERFACE
  366. #define INTERFACE   IExchExtSessionEvents
  367.  
  368. DECLARE_INTERFACE_(IExchExtSessionEvents, IUnknown)
  369. {
  370.     BEGIN_INTERFACE
  371.  
  372.     // *** IUnknown methods ***
  373.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  374.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  375.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  376.  
  377.     // *** IExchExtEvents methods ***
  378.     STDMETHOD(OnDelivery)(THIS_ LPEXCHEXTCALLBACK lpeecb) PURE;
  379. };
  380. typedef IExchExtSessionEvents FAR * LPEXCHEXTSESSIONEVENTS;
  381.  
  382.  
  383. /*
  384.  *  IExchExtMessageEvents
  385.  *
  386.  *  Purpose:
  387.  *      Interface implemented by Exchange client extensions that wish to
  388.  *      take special action when certain events happen to messages.
  389.  */
  390. #undef INTERFACE
  391. #define INTERFACE   IExchExtMessageEvents
  392.  
  393. DECLARE_INTERFACE_(IExchExtMessageEvents, IUnknown)
  394. {
  395.     BEGIN_INTERFACE
  396.  
  397.     // *** IUnknown methods ***
  398.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  399.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  400.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  401.  
  402.     // *** IExchExtMessageEvents methods ***
  403.     STDMETHOD(OnRead)(THIS_ LPEXCHEXTCALLBACK lpeecb) PURE;
  404.     STDMETHOD(OnReadComplete)(THIS_ LPEXCHEXTCALLBACK lpeecb, 
  405.                               ULONG ulFlags) PURE;
  406.     STDMETHOD(OnWrite)(THIS_ LPEXCHEXTCALLBACK lpeecb) PURE;
  407.     STDMETHOD(OnWriteComplete)(THIS_ LPEXCHEXTCALLBACK lpeecb, 
  408.                                ULONG ulFlags) PURE;
  409.     STDMETHOD(OnCheckNames)(THIS_ LPEXCHEXTCALLBACK lpeecb) PURE;
  410.     STDMETHOD(OnCheckNamesComplete)(THIS_ LPEXCHEXTCALLBACK lpeecb, 
  411.                                     ULONG ulFlags) PURE;
  412.     STDMETHOD(OnSubmit)(THIS_ LPEXCHEXTCALLBACK lpeecb) PURE;
  413.     STDMETHOD_(VOID, OnSubmitComplete)(THIS_ LPEXCHEXTCALLBACK lpeecb, 
  414.                                        ULONG ulFlags) PURE;
  415. };
  416. typedef IExchExtMessageEvents FAR * LPEXCHEXTMESSAGEEVENTS;
  417.  
  418.  
  419. /*
  420.  *  IExchExtAttachedFileEvents
  421.  *
  422.  *  Purpose:
  423.  *      Interface implemented by Exchange client extensions that wish to
  424.  *      take special action when certain events happen to attached files.
  425.  */
  426. #undef INTERFACE
  427. #define INTERFACE   IExchExtAttachedFileEvents
  428.  
  429. DECLARE_INTERFACE_(IExchExtAttachedFileEvents, IUnknown)
  430. {
  431.     BEGIN_INTERFACE
  432.  
  433.     // *** IUnknown methods ***
  434.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  435.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  436.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  437.  
  438.     // *** IExchExtAttachedFileEvents methods ***
  439.     STDMETHOD(OnReadPattFromSzFile)(THIS_ LPATTACH lpatt, LPTSTR lpszFile,
  440.                                     ULONG ulFlags) PURE;
  441.     STDMETHOD(OnWritePattToSzFile)(THIS_ LPATTACH lpatt, LPTSTR lpszFile,
  442.                                    ULONG ulFlags) PURE;
  443.     STDMETHOD(QueryDisallowOpenPatt)(THIS_ LPATTACH lpatt) PURE;
  444.     STDMETHOD(OnOpenPatt)(THIS_ LPATTACH lpatt) PURE;
  445.     STDMETHOD(OnOpenSzFile)(THIS_ LPTSTR lpszFile, ULONG ulFlags) PURE;
  446. };
  447. typedef IExchExtAttachedFileEvents FAR * LPEXCHEXTATTACHEDFILEEVENTS;
  448.  
  449.  
  450. /*
  451.  *  IExchExtPropertySheets
  452.  *
  453.  *  Purpose:
  454.  *      Interface implemented by Exchange client extensions that wish
  455.  *      to add additional pages to the client's object property sheets.
  456.  */
  457. #undef INTERFACE
  458. #define INTERFACE   IExchExtPropertySheets
  459.  
  460. DECLARE_INTERFACE_(IExchExtPropertySheets, IUnknown)
  461. {
  462.     BEGIN_INTERFACE
  463.  
  464.     // *** IUnknown methods ***
  465.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  466.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  467.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  468.  
  469.     // *** IExchExtPropertySheet methods ***
  470.     STDMETHOD_(ULONG,GetMaxPageCount) (THIS_ ULONG ulFlags) PURE;
  471.     STDMETHOD(GetPages) (THIS_ LPEXCHEXTCALLBACK lpeecb, ULONG ulFlags,
  472.                          LPPROPSHEETPAGE lppsp, ULONG FAR * lpcpsp) PURE;
  473.     STDMETHOD_(VOID,FreePages) (THIS_ LPPROPSHEETPAGE lppsp, 
  474.                                 ULONG ulFlags, ULONG cpsp) PURE;
  475. };
  476. typedef IExchExtPropertySheets FAR * LPEXCHEXTPROPERTYSHEETS;
  477.  
  478.  
  479. /*
  480.  *  IExchExtAdvancedCriteria
  481.  *
  482.  *  Purpose:
  483.  *      Interface implemented by Exchange client extensions that wish to
  484.  *      implement an advanced criteria dialog.
  485.  */
  486. #undef INTERFACE
  487. #define INTERFACE   IExchExtAdvancedCriteria
  488.  
  489. DECLARE_INTERFACE_(IExchExtAdvancedCriteria, IUnknown)
  490. {
  491.     BEGIN_INTERFACE
  492.  
  493.     // *** IUnknown methods ***
  494.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  495.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  496.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  497.  
  498.     // *** IExchExtAdvancedCriteria methods ***
  499.     STDMETHOD(InstallAdvancedCriteria) (THIS_ HWND hwnd, LPSRestriction lpres, 
  500.                                         BOOL fNot, LPENTRYLIST lpeidl, 
  501.                                         ULONG ulFlags) PURE;
  502.     STDMETHOD(DoDialog) (THIS) PURE;
  503.     STDMETHOD_(VOID,Clear) (THIS) PURE;
  504.     STDMETHOD_(VOID,SetFolders) (THIS_ LPENTRYLIST lpeidl, ULONG ulFlags) PURE;
  505.     STDMETHOD(QueryRestriction) (THIS_ LPVOID lpvAllocBase, 
  506.                                  LPSRestriction FAR * lppres,
  507.                                  LPSPropTagArray FAR * lppPropTags,
  508.                                  LPMAPINAMEID FAR * FAR * lpppPropNames,
  509.                                  BOOL * lpfNot, LPTSTR lpszDesc, ULONG cchDesc, 
  510.                                  ULONG ulFlags) PURE;
  511.     STDMETHOD_(VOID,UninstallAdvancedCriteria) (THIS) PURE;
  512. };
  513. typedef IExchExtAdvancedCriteria FAR * LPEXCHEXTADVANCEDCRITERIA;
  514.  
  515.  
  516. /*
  517.  *  IExchExtModeless
  518.  *
  519.  *  Purpose:
  520.  *      Interface implemented by Exchange client extensions that wish
  521.  *      to create modeless UI.
  522.  */
  523. #undef INTERFACE
  524. #define INTERFACE   IExchExtModeless
  525.  
  526. DECLARE_INTERFACE_(IExchExtModeless, IUnknown)
  527. {
  528.     BEGIN_INTERFACE
  529.  
  530.     // *** IUnknown methods ***
  531.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * lppvObj) PURE;
  532.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  533.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  534.  
  535.     // *** IExchExtModeless methods ***
  536.     STDMETHOD(TranslateAccelerator) (THIS_ LPMSG pmsg) PURE;
  537.     STDMETHOD(EnableModeless) (THIS_ BOOL fEnable) PURE;
  538. };
  539.  
  540.  
  541. /*
  542.  *  G U I D s
  543.  */
  544.  
  545.  
  546. #define DEFINE_EXCHEXTGUID(name, b) \
  547.     DEFINE_GUID(name, 0x00020D00 | (b), 0, 0, 0xC0,0,0,0,0,0,0,0x46)
  548.  
  549. #ifndef NOEXCHEXTGUIDS
  550. DEFINE_EXCHEXTGUID(IID_IExchExtCallback,            0x10);
  551. DEFINE_EXCHEXTGUID(IID_IExchExt,                    0x11);
  552. DEFINE_EXCHEXTGUID(IID_IExchExtCommands,            0x12);
  553. DEFINE_EXCHEXTGUID(IID_IExchExtUserEvents,          0x13);
  554. DEFINE_EXCHEXTGUID(IID_IExchExtSessionEvents,       0x14);
  555. DEFINE_EXCHEXTGUID(IID_IExchExtMessageEvents,       0x15);
  556. DEFINE_EXCHEXTGUID(IID_IExchExtAttachedFileEvents,  0x16);
  557. DEFINE_EXCHEXTGUID(IID_IExchExtPropertySheets,      0x17);
  558. DEFINE_EXCHEXTGUID(IID_IExchExtAdvancedCriteria,    0x18);
  559. DEFINE_EXCHEXTGUID(IID_IExchExtModeless,            0x19);
  560. DEFINE_EXCHEXTGUID(IID_IExchExtModelessCallback,    0x1a);
  561. #endif // NOEXCHEXTGUIDS
  562.  
  563.  
  564. /*
  565.  *  C M D I D s
  566.  */
  567.  
  568.  
  569. // File
  570. #define EECMDID_File                                10
  571. #define EECMDID_FileOpen                            11
  572. #define EECMDID_FileSend                            12
  573. #define EECMDID_FileSave                            13
  574. #define EECMDID_FileSaveAs                          14
  575. #define EECMDID_FileMove                            16
  576. #define EECMDID_FileCopy                            17
  577. #define EECMDID_FilePrint                           25
  578. #define EECMDID_FileNewEntry                        18
  579. #define EECMDID_FileNewMessage                      19
  580. #define EECMDID_FileNewFolder                       20
  581. #define EECMDID_FileAddToPAB                        29
  582. #define EECMDID_FileDelete                          21
  583. #define EECMDID_FileRename                          22
  584. #define EECMDID_FileProperties                      23
  585. #define EECMDID_FileClose                           30
  586. #define EECMDID_FileExit                            32
  587. #define EECMDID_FileExitAndLogOff                   33
  588.  
  589. // Edit
  590. #define EECMDID_Edit                                40
  591. #define EECMDID_EditUndo                            41
  592. #define EECMDID_EditCut                             42
  593. #define EECMDID_EditCopy                            43
  594. #define EECMDID_EditPaste                           44
  595. #define EECMDID_EditPasteSpecial                    45
  596. #define EECMDID_EditSelectAll                       46
  597. #define EECMDID_EditMarkAsRead                      49
  598. #define EECMDID_EditMarkAsUnread                    50
  599. #define EECMDID_EditMarkToRetrieve                  52
  600. #define EECMDID_EditMarkToRetrieveACopy             53
  601. #define EECMDID_EditMarkToDelete                    54
  602. #define EECMDID_EditUnmarkAll                       55
  603. #define EECMDID_EditFind                            56
  604. #define EECMDID_EditReplace                         57
  605. #define EECMDID_EditLinks                           59
  606. #define EECMDID_EditObject                          60
  607. #define EECMDID_EditObjectConvert                   61
  608. #ifdef DBCS
  609. #define EECMDID_EditFullShape                       62
  610. #define EECMDID_EditHiraKataAlpha                   63
  611. #define EECMDID_EditHangAlpha                       64
  612. #define EECMDID_EditHanja                           65
  613. #define EECMDID_EditRoman                           66
  614. #define EECMDID_EditCode                            67  
  615. #endif
  616.  
  617. // View
  618. #define EECMDID_View                                70
  619. #define EECMDID_ViewFolders                         71
  620. #define EECMDID_ViewToolbar                         72
  621. #define EECMDID_ViewFormattingToolbar               73
  622. #define EECMDID_ViewStatusBar                       74
  623. #define EECMDID_ViewNewWindow                       75
  624. #define EECMDID_ViewColumns                         79
  625. #define EECMDID_ViewSort                            78
  626. #define EECMDID_ViewFilter                          80
  627. #define EECMDID_ViewBccBox                          91
  628. #define EECMDID_ViewPrevious                        87
  629. #define EECMDID_ViewNext                            88
  630. #ifdef DBCS                                         
  631. #define EECMDID_ViewWritingMode                     89
  632. #define EECMDID_ViewImeStatus                       94
  633. #endif
  634.                                                     
  635. // Insert                                           
  636. #define EECMDID_Insert                              100
  637. #define EECMDID_InsertFile                          101
  638. #define EECMDID_InsertMessage                       102
  639. #define EECMDID_InsertObject                        103
  640. #define EECMDID_InsertInkObject                     104
  641.                                                     
  642. // Format                                           
  643. #define EECMDID_Format                              110
  644. #define EECMDID_FormatFont                          111
  645. #define EECMDID_FormatParagraph                     112
  646.                                                     
  647. // Tools                                            
  648. #define EECMDID_Tools                               120
  649. #define EECMDID_ToolsDeliverNowUsing                121
  650. #define EECMDID_ToolsDeliverNow                     122
  651. #define EECMDID_ToolsSpelling                       131
  652. #define EECMDID_ToolsAddressBook                    123
  653. #define EECMDID_ToolsCheckNames                     133
  654. #define EECMDID_ToolsFind                           124
  655. #define EECMDID_ToolsConnect                        126
  656. #define EECMDID_ToolsUpdateHeaders                  127
  657. #define EECMDID_ToolsTransferMail                   128
  658. #define EECMDID_ToolsDisconnect                     129
  659. #define EECMDID_ToolsRemoteMail                     130
  660. #define EECMDID_ToolsCustomizeToolbar               134
  661. #define EECMDID_ToolsServices                       135
  662. #define EECMDID_ToolsOptions                        136
  663. #ifdef DBCS                                         
  664. #define EECMDID_ToolsWordRegistration               137
  665. #endif                                              
  666.                                                     
  667. // Compose                                          
  668. #define EECMDID_Compose                             150
  669. #define EECMDID_ComposeNewMessage                   151
  670. #define EECMDID_ComposeReplyToSender                154
  671. #define EECMDID_ComposeReplyToAll                   155
  672. #define EECMDID_ComposeForward                      156
  673.                                                     
  674. // Help
  675. #define EECMDID_Help                                160
  676. #define EECMDID_HelpMicrosoftExchangeHelpTopics     161
  677. #define EECMDID_HelpAboutMicrosoftExchange          162
  678.  
  679. // Header                                           
  680. #define EECMDID_CtxHeader                           203
  681. #define EECMDID_CtxHeaderSortAscending              204
  682. #define EECMDID_CtxHeaderSortDescending             205
  683.                                                     
  684. // In Folder                                        
  685. #define EECMDID_CtxInFolder                         206
  686. #define EECMDID_CtxInFolderChoose                   207
  687.                                                     
  688. // Container                                        
  689. #define EECMDID_CtxContainer                        208
  690. #define EECMDID_CtxContainerProperties              209
  691.  
  692. // Standard Toolbar
  693. #define EECMDID_Toolbar                             220
  694. #define EECMDID_ToolbarPrint                        221
  695. #define EECMDID_ToolbarReadReceipt                  222
  696. #define EECMDID_ToolbarImportanceHigh               223
  697. #define EECMDID_ToolbarImportanceLow                224
  698. #define EECMDID_ToolbarFolderList                   225
  699. #define EECMDID_ToolbarOpenParent                   226
  700. #define EECMDID_ToolbarInbox                        76
  701. #define EECMDID_ToolbarOutbox                       77
  702.  
  703. // Formatting Toolbar
  704. #define EECMDID_Formatting                          230
  705. #define EECMDID_FormattingFont                      231
  706. #define EECMDID_FormattingSize                      232
  707. #define EECMDID_FormattingColor                     233
  708. #define EECMDID_FormattingColorAuto                 234
  709. #define EECMDID_FormattingColor1                    235
  710. #define EECMDID_FormattingColor2                    236
  711. #define EECMDID_FormattingColor3                    237
  712. #define EECMDID_FormattingColor4                    238
  713. #define EECMDID_FormattingColor5                    239
  714. #define EECMDID_FormattingColor6                    240
  715. #define EECMDID_FormattingColor7                    241
  716. #define EECMDID_FormattingColor8                    242
  717. #define EECMDID_FormattingColor9                    243
  718. #define EECMDID_FormattingColor10                   244
  719. #define EECMDID_FormattingColor11                   245
  720. #define EECMDID_FormattingColor12                   246
  721. #define EECMDID_FormattingColor13                   247
  722. #define EECMDID_FormattingColor14                   248
  723. #define EECMDID_FormattingColor15                   249
  724. #define EECMDID_FormattingColor16                   250
  725. #define EECMDID_FormattingBold                      251
  726. #define EECMDID_FormattingItalic                    252
  727. #define EECMDID_FormattingUnderline                 253
  728. #define EECMDID_FormattingBullets                   254
  729. #define EECMDID_FormattingDecreaseIndent            255
  730. #define EECMDID_FormattingIncreaseIndent            256
  731. #define EECMDID_FormattingLeft                      257
  732. #define EECMDID_FormattingCenter                    258
  733. #define EECMDID_FormattingRight                     259
  734.  
  735. // Note accelerators
  736. #define EECMDID_Accel                               270
  737. #define EECMDID_AccelFont                           271
  738. #define EECMDID_AccelSize                           272
  739. #define EECMDID_AccelSizePlus1                      273
  740. #define EECMDID_AccelSizeMinus1                     274
  741. #define EECMDID_AccelBold                           275
  742. #define EECMDID_AccelItalic                         276
  743. #define EECMDID_AccelUnderline                      277
  744. #define EECMDID_AccelLeft                           278
  745. #define EECMDID_AccelCenter                         279
  746. #define EECMDID_AccelRight                          280
  747. #define EECMDID_AccelBullets                        281
  748. #define EECMDID_AccelNoFormatting                   282
  749. #define EECMDID_AccelRepeatFind                     283
  750. #define EECMDID_AccelContextHelp                    284
  751. #define EECMDID_AccelNextWindow                     285
  752. #define EECMDID_AccelPrevWindow                     286
  753. #define EECMDID_AccelCtrlTab                        287
  754. #define EECMDID_AccelUndo                           288
  755. #define EECMDID_AccelCut                            289
  756. #define EECMDID_AccelCopy                           290
  757. #define EECMDID_AccelPaste                          291
  758. #define EECMDID_AccelSubject                        292
  759. #define EECMDID_AccelContextHelpOff                 293
  760. #define EECMDID_AccelDecreaseIndent                 294
  761. #define EECMDID_AccelIncreaseIndent                 295
  762. #define EECMDID_AccelColor                          296
  763.  
  764. // Edit.Object
  765. #define EECMDID_ObjectMin                           300
  766. #define EECMDID_ObjectMax                           399
  767.  
  768. // Tools.Remote Mail
  769. #define EECMDID_RemoteMailMin                       600
  770. #define EECMDID_RemoteMailMax                       699
  771.  
  772. // Tools.Deliver Now Using
  773. #define EECMDID_DeliverNowUsingMin                  700
  774. #define EECMDID_DeliverNowUsingMax                  799
  775.  
  776. // Form verbs
  777. #define EECMDID_FormVerbMin                         800
  778. #define EECMDID_FormVerbMax                         899
  779.  
  780. // For backward compatibility with earlier header versions
  781. #define EECMDID_ViewInbox               EECMDID_ToolbarInbox
  782. #define EECMDID_ViewOutbox              EECMDID_ToolbarOutbox
  783. #define EECMDID_ViewItemAbove           EECMDID_ViewPrevious
  784. #define EECMDID_ViewItemBelow           EECMDID_ViewNext
  785. #define EECMDID_ToolsFindItem           EECMDID_ToolsFind
  786. #define EECMDID_HelpUsersGuideContents  EECMDID_HelpMicrosoftExchangeHelpTopics
  787. #define EECMDID_HelpAbout               EECMDID_HelpAboutMicrosoftExchange
  788.  
  789. #ifdef __BORLANDC__
  790.   #include <poppack.h>
  791. #endif
  792.  
  793. #endif // EXCHEXT_H
  794.