Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

631 lines
27 KiB

  1. /*
  2. * M A P I F O R M . H
  3. *
  4. * Declarations of interfaces for clients and providers of MAPI
  5. * forms and form registries.
  6. *
  7. * Copyright 1986-1999 Microsoft Corporation. All Rights Reserved.
  8. */
  9. #ifndef MAPIFORM_H
  10. #define MAPIFORM_H
  11. #if _MSC_VER > 1000
  12. #pragma once
  13. #endif
  14. /* Include common MAPI header files if they haven't been already. */
  15. #ifndef MAPIDEFS_H
  16. #include <mapidefs.h>
  17. #include <mapicode.h>
  18. #include <mapiguid.h>
  19. #include <mapitags.h>
  20. #endif
  21. #ifndef BEGIN_INTERFACE
  22. #define BEGIN_INTERFACE
  23. #endif
  24. #ifndef _MAC
  25. typedef const RECT FAR *LPCRECT;
  26. #endif
  27. /* HFRMREG is an enumeration which represents a registry container.
  28. * Microsoft reserves the values from 0 to 0x3FFF for its own use.
  29. */
  30. typedef ULONG HFRMREG;
  31. #define HFRMREG_DEFAULT 0
  32. #define HFRMREG_LOCAL 1
  33. #define HFRMREG_PERSONAL 2
  34. #define HFRMREG_FOLDER 3
  35. DECLARE_MAPI_INTERFACE_PTR(IPersistMessage, LPPERSISTMESSAGE);
  36. DECLARE_MAPI_INTERFACE_PTR(IMAPIMessageSite, LPMAPIMESSAGESITE);
  37. DECLARE_MAPI_INTERFACE_PTR(IMAPISession, LPMAPISESSION);
  38. DECLARE_MAPI_INTERFACE_PTR(IMAPIViewContext, LPMAPIVIEWCONTEXT);
  39. DECLARE_MAPI_INTERFACE_PTR(IMAPIViewAdviseSink, LPMAPIVIEWADVISESINK);
  40. DECLARE_MAPI_INTERFACE_PTR(IMAPIFormAdviseSink, LPMAPIFORMADVISESINK);
  41. DECLARE_MAPI_INTERFACE_PTR(IMAPIFormInfo, LPMAPIFORMINFO);
  42. DECLARE_MAPI_INTERFACE_PTR(IMAPIFormMgr, LPMAPIFORMMGR);
  43. DECLARE_MAPI_INTERFACE_PTR(IMAPIFormContainer, LPMAPIFORMCONTAINER);
  44. DECLARE_MAPI_INTERFACE_PTR(IMAPIForm, LPMAPIFORM);
  45. DECLARE_MAPI_INTERFACE_PTR(IMAPIFormFactory, LPMAPIFORMFACTORY);
  46. typedef const char FAR *FAR * LPPCSTR;
  47. typedef LPMAPIFORMINFO FAR *LPPMAPIFORMINFO;
  48. STDAPI MAPIOpenFormMgr(LPMAPISESSION pSession, LPMAPIFORMMGR FAR * ppmgr);
  49. STDAPI MAPIOpenLocalFormContainer(LPMAPIFORMCONTAINER FAR * ppfcnt);
  50. /*-- GetLastError ----------------------------------------------------------*/
  51. /* This defines the GetLastError method held in common by most mapiform
  52. * interfaces. It is defined separately so that an implementor may include
  53. * more than one mapiform interface in a class.
  54. */
  55. #define MAPI_GETLASTERROR_METHOD(IPURE) \
  56. MAPIMETHOD(GetLastError) (THIS_ \
  57. /*in*/ HRESULT hResult, \
  58. /*in*/ ULONG ulFlags, \
  59. /*out*/ LPMAPIERROR FAR * lppMAPIError) IPURE; \
  60. /*-- IPersistMessage -------------------------------------------------------*/
  61. /* This interface is implemented by forms and is used to save,
  62. * initialize and load forms to and from messages.
  63. */
  64. #define MAPI_IPERSISTMESSAGE_METHODS(IPURE) \
  65. MAPIMETHOD(GetClassID) (THIS_ LPCLSID lpClassID) IPURE; \
  66. MAPIMETHOD(IsDirty)(THIS) IPURE; \
  67. MAPIMETHOD(InitNew)(THIS_ \
  68. /*in*/ LPMAPIMESSAGESITE pMessageSite, \
  69. /*in*/ LPMESSAGE pMessage) IPURE; \
  70. MAPIMETHOD(Load)(THIS_ \
  71. /*in*/ LPMAPIMESSAGESITE pMessageSite, \
  72. /*in*/ LPMESSAGE pMessage, \
  73. /*in*/ ULONG ulMessageStatus, \
  74. /*in*/ ULONG ulMessageFlags) IPURE; \
  75. MAPIMETHOD(Save)(THIS_ \
  76. /*in*/ LPMESSAGE pMessage, \
  77. /*in*/ ULONG fSameAsLoad) IPURE; \
  78. MAPIMETHOD(SaveCompleted)(THIS_ \
  79. /*in*/ LPMESSAGE pMessage) IPURE; \
  80. MAPIMETHOD(HandsOffMessage)(THIS) IPURE; \
  81. #undef INTERFACE
  82. #define INTERFACE IPersistMessage
  83. DECLARE_MAPI_INTERFACE_(IPersistMessage, IUnknown)
  84. {
  85. BEGIN_INTERFACE
  86. MAPI_IUNKNOWN_METHODS(PURE)
  87. MAPI_GETLASTERROR_METHOD(PURE)
  88. MAPI_IPERSISTMESSAGE_METHODS(PURE)
  89. };
  90. /*-- IMAPIMessageSite ------------------------------------------------------*/
  91. #define MAPI_IMAPIMESSAGESITE_METHODS(IPURE) \
  92. MAPIMETHOD(GetSession) (THIS_ \
  93. /*out*/ LPMAPISESSION FAR * ppSession) IPURE; \
  94. MAPIMETHOD(GetStore) (THIS_ \
  95. /*out*/ LPMDB FAR * ppStore) IPURE; \
  96. MAPIMETHOD(GetFolder) (THIS_ \
  97. /*out*/ LPMAPIFOLDER FAR * ppFolder) IPURE; \
  98. MAPIMETHOD(GetMessage) (THIS_ \
  99. /*out*/ LPMESSAGE FAR * ppmsg) IPURE; \
  100. MAPIMETHOD(GetFormManager) (THIS_ \
  101. /*out*/ LPMAPIFORMMGR FAR * ppFormMgr) IPURE; \
  102. MAPIMETHOD(NewMessage) (THIS_ \
  103. /*in*/ ULONG fComposeInFolder, \
  104. /*in*/ LPMAPIFOLDER pFolderFocus, \
  105. /*in*/ LPPERSISTMESSAGE pPersistMessage, \
  106. /*out*/ LPMESSAGE FAR * ppMessage, \
  107. /*out*/ LPMAPIMESSAGESITE FAR * ppMessageSite, \
  108. /*out*/ LPMAPIVIEWCONTEXT FAR * ppViewContext) IPURE; \
  109. MAPIMETHOD(CopyMessage) (THIS_ \
  110. /*in*/ LPMAPIFOLDER pFolderDestination) IPURE; \
  111. MAPIMETHOD(MoveMessage) (THIS_ \
  112. /*in*/ LPMAPIFOLDER pFolderDestination, \
  113. /*in*/ LPMAPIVIEWCONTEXT pViewContext, \
  114. /*in*/ LPCRECT prcPosRect) IPURE; \
  115. MAPIMETHOD(DeleteMessage) (THIS_ \
  116. /*in*/ LPMAPIVIEWCONTEXT pViewContext, \
  117. /*in*/ LPCRECT prcPosRect) IPURE; \
  118. MAPIMETHOD(SaveMessage) (THIS) IPURE; \
  119. MAPIMETHOD(SubmitMessage) (THIS_ \
  120. /*in*/ ULONG ulFlags) IPURE; \
  121. MAPIMETHOD(GetSiteStatus) (THIS_ \
  122. /*out*/ LPULONG lpulStatus) IPURE; \
  123. #undef INTERFACE
  124. #define INTERFACE IMAPIMessageSite
  125. DECLARE_MAPI_INTERFACE_(IMAPIMessageSite, IUnknown)
  126. {
  127. BEGIN_INTERFACE
  128. MAPI_IUNKNOWN_METHODS(PURE)
  129. MAPI_GETLASTERROR_METHOD(PURE)
  130. MAPI_IMAPIMESSAGESITE_METHODS(PURE)
  131. };
  132. /*-- IMAPIForm -------------------------------------------------------------*/
  133. /* This interface is implemented by forms for the benefit of viewers.
  134. * One method (ShutdownForm) is provided such that simple forms implementing
  135. * only IMAPIForm and IPersistMessage have reasonable embedding behavior.
  136. */
  137. #define MAPI_IMAPIFORM_METHODS(IPURE) \
  138. MAPIMETHOD(SetViewContext) (THIS_ \
  139. /*in*/ LPMAPIVIEWCONTEXT pViewContext) IPURE; \
  140. MAPIMETHOD(GetViewContext) (THIS_ \
  141. /*out*/ LPMAPIVIEWCONTEXT FAR * ppViewContext) IPURE; \
  142. MAPIMETHOD(ShutdownForm)(THIS_ \
  143. /*in*/ ULONG ulSaveOptions) IPURE; \
  144. MAPIMETHOD(DoVerb) (THIS_ \
  145. /*in*/ LONG iVerb, \
  146. /*in*/ LPMAPIVIEWCONTEXT lpViewContext, /* can be null */ \
  147. /*in*/ ULONG hwndParent, \
  148. /*in*/ LPCRECT lprcPosRect) IPURE; \
  149. MAPIMETHOD(Advise)(THIS_ \
  150. /*in*/ LPMAPIVIEWADVISESINK pAdvise, \
  151. /*out*/ ULONG FAR * pdwStatus) IPURE; \
  152. MAPIMETHOD(Unadvise) (THIS_ \
  153. /*in*/ ULONG ulConnection) IPURE; \
  154. #undef INTERFACE
  155. #define INTERFACE IMAPIForm
  156. DECLARE_MAPI_INTERFACE_(IMAPIForm, IUnknown)
  157. {
  158. BEGIN_INTERFACE
  159. MAPI_IUNKNOWN_METHODS(PURE)
  160. MAPI_GETLASTERROR_METHOD(PURE)
  161. MAPI_IMAPIFORM_METHODS(PURE)
  162. };
  163. typedef enum tagSAVEOPTS
  164. {
  165. SAVEOPTS_SAVEIFDIRTY = 0,
  166. SAVEOPTS_NOSAVE = 1,
  167. SAVEOPTS_PROMPTSAVE = 2
  168. } SAVEOPTS;
  169. /*-- IMAPIViewContext ------------------------------------------------------*/
  170. /* Implemented by viewers to support next/previous in forms.
  171. */
  172. /* Structure passed in GetPrintSetup */
  173. typedef struct {
  174. ULONG ulFlags; /* MAPI_UNICODE */
  175. HGLOBAL hDevMode;
  176. HGLOBAL hDevNames;
  177. ULONG ulFirstPageNumber;
  178. ULONG fPrintAttachments;
  179. } FORMPRINTSETUP, FAR * LPFORMPRINTSETUP;
  180. /* Values for pulFormat in GetSaveStream */
  181. #define SAVE_FORMAT_TEXT 1
  182. #define SAVE_FORMAT_RICHTEXT 2
  183. /* Values from 0 to 0x3fff are reserved for future definition by Microsoft */
  184. #define MAPI_IMAPIVIEWCONTEXT_METHODS(IPURE) \
  185. MAPIMETHOD(SetAdviseSink)(THIS_ \
  186. /*in*/ LPMAPIFORMADVISESINK pmvns) IPURE; \
  187. MAPIMETHOD(ActivateNext)(THIS_ \
  188. /*in*/ ULONG ulDir, \
  189. /*in*/ LPCRECT prcPosRect) IPURE; \
  190. MAPIMETHOD(GetPrintSetup)(THIS_ \
  191. /*in*/ ULONG ulFlags, \
  192. /*out*/ LPFORMPRINTSETUP FAR * lppFormPrintSetup) IPURE; \
  193. MAPIMETHOD(GetSaveStream)(THIS_ \
  194. /*out*/ ULONG FAR * pulFlags, \
  195. /*out*/ ULONG FAR * pulFormat, \
  196. /*out*/ LPSTREAM FAR * ppstm) IPURE; \
  197. MAPIMETHOD(GetViewStatus) (THIS_ \
  198. /*out*/ LPULONG lpulStatus) IPURE; \
  199. #undef INTERFACE
  200. #define INTERFACE IMAPIViewContext
  201. DECLARE_MAPI_INTERFACE_(IMAPIViewContext, IUnknown)
  202. {
  203. BEGIN_INTERFACE
  204. MAPI_IUNKNOWN_METHODS(PURE)
  205. MAPI_GETLASTERROR_METHOD(PURE)
  206. MAPI_IMAPIVIEWCONTEXT_METHODS(PURE)
  207. };
  208. #define VCSTATUS_NEXT 0x00000001
  209. #define VCSTATUS_PREV 0x00000002
  210. #define VCSTATUS_MODAL 0x00000004
  211. #define VCSTATUS_INTERACTIVE 0x00000008
  212. #define VCSTATUS_READONLY 0x00000010
  213. #define VCSTATUS_DELETE 0x00010000
  214. #define VCSTATUS_COPY 0x00020000
  215. #define VCSTATUS_MOVE 0x00040000
  216. #define VCSTATUS_SUBMIT 0x00080000
  217. #define VCSTATUS_DELETE_IS_MOVE 0x00100000
  218. #define VCSTATUS_SAVE 0x00200000
  219. #define VCSTATUS_NEW_MESSAGE 0x00400000
  220. #define VCDIR_NEXT VCSTATUS_NEXT
  221. #define VCDIR_PREV VCSTATUS_PREV
  222. #define VCDIR_DELETE VCSTATUS_DELETE
  223. #define VCDIR_MOVE VCSTATUS_MOVE
  224. /*-- IMAPIFormAdviseSink ---------------------------------------------------*/
  225. /* Part of form server, held by view; receives notifications from the view.
  226. *
  227. * This part of the form server, but is not an interface on the form
  228. * object. This means that clients should not expect to QueryInterface
  229. * from an IMAPIForm* or IOleObject* to this interface, or vice versa.
  230. */
  231. #define MAPI_IMAPIFORMADVISESINK_METHODS(IPURE) \
  232. STDMETHOD(OnChange)(THIS_ ULONG ulDir) IPURE; \
  233. STDMETHOD(OnActivateNext)(THIS_ \
  234. /*in*/ LPCSTR lpszMessageClass, \
  235. /*in*/ ULONG ulMessageStatus, \
  236. /*in*/ ULONG ulMessageFlags, \
  237. /*out*/ LPPERSISTMESSAGE FAR * ppPersistMessage) IPURE; \
  238. #undef INTERFACE
  239. #define INTERFACE IMAPIFormAdviseSink
  240. DECLARE_MAPI_INTERFACE_(IMAPIFormAdviseSink, IUnknown)
  241. {
  242. BEGIN_INTERFACE
  243. MAPI_IUNKNOWN_METHODS(PURE)
  244. MAPI_IMAPIFORMADVISESINK_METHODS(PURE)
  245. };
  246. /*-- IMAPIViewAdviseSink ---------------------------------------------------*/
  247. /* Part of view context, held by form; receives notifications from the form.
  248. */
  249. #define MAPI_IMAPIVIEWADVISESINK_METHODS(IPURE) \
  250. MAPIMETHOD(OnShutdown)(THIS) IPURE; \
  251. MAPIMETHOD(OnNewMessage)(THIS) IPURE; \
  252. MAPIMETHOD(OnPrint)(THIS_ \
  253. /*in*/ ULONG dwPageNumber, \
  254. /*in*/ HRESULT hrStatus) IPURE; \
  255. MAPIMETHOD(OnSubmitted) (THIS) IPURE; \
  256. MAPIMETHOD(OnSaved) (THIS) IPURE; \
  257. #undef INTERFACE
  258. #define INTERFACE IMAPIViewAdviseSink
  259. DECLARE_MAPI_INTERFACE_(IMAPIViewAdviseSink, IUnknown)
  260. {
  261. BEGIN_INTERFACE
  262. MAPI_IUNKNOWN_METHODS(PURE)
  263. MAPI_IMAPIVIEWADVISESINK_METHODS(PURE)
  264. };
  265. /*-- IMAPIFormInfo ---------------------------------------------------------*/
  266. /* Is implemented by registries. Describes the form.
  267. */
  268. /* Single enum value */
  269. typedef struct
  270. { /* fpev */
  271. LPTSTR pszDisplayName; /* carries the display string */
  272. ULONG nVal; /* the value for the above enumeration */
  273. } SMAPIFormPropEnumVal, FAR * LPMAPIFORMPROPENUMVAL;
  274. /* MAPI Form property descriptor */
  275. /*
  276. * Values for the tag in the SMAPIFormProp structure
  277. *
  278. * Microsoft reserves the range from 0 to 0x3FFF for future use in its other
  279. * forms registry implementations.
  280. */
  281. typedef ULONG FORMPROPSPECIALTYPE;
  282. #define FPST_VANILLA 0
  283. #define FPST_ENUM_PROP 1
  284. typedef struct
  285. {
  286. ULONG ulFlags; /* Contains MAPI_UNICODE if strings are UNICODE */
  287. ULONG nPropType; /* type of the property, hiword is 0 */
  288. MAPINAMEID nmid; /* id of the property */
  289. LPTSTR pszDisplayName;
  290. FORMPROPSPECIALTYPE nSpecialType; /* tag for the following union */
  291. union
  292. {
  293. struct
  294. {
  295. MAPINAMEID nmidIdx;
  296. ULONG cfpevAvailable; /* # of enums */
  297. LPMAPIFORMPROPENUMVAL pfpevAvailable;
  298. } s1; /* Property String/Number association Enumeration */
  299. } u;
  300. } SMAPIFormProp, FAR * LPMAPIFORMPROP;
  301. /* Array of form properties */
  302. typedef struct
  303. {
  304. ULONG cProps;
  305. ULONG ulPad; /* Pad to 8-byte alignment for insurance */
  306. SMAPIFormProp aFormProp[MAPI_DIM];
  307. } SMAPIFormPropArray, FAR * LPMAPIFORMPROPARRAY;
  308. #define CbMAPIFormPropArray(_c) \
  309. (offsetof(SMAPIFormPropArray, aFormProp) + \
  310. (_c)*sizeof(SMAPIFormProp))
  311. /* Structure defining the layout of an mapi verb description */
  312. typedef struct
  313. {
  314. LONG lVerb;
  315. LPTSTR szVerbname;
  316. DWORD fuFlags;
  317. DWORD grfAttribs;
  318. ULONG ulFlags; /* Either 0 or MAPI_UNICODE */
  319. } SMAPIVerb, FAR * LPMAPIVERB;
  320. /* Structure used for returning arrays of mapi verbs */
  321. typedef struct
  322. {
  323. ULONG cMAPIVerb; /* Number of verbs in the structure */
  324. SMAPIVerb aMAPIVerb[MAPI_DIM];
  325. } SMAPIVerbArray, FAR * LPMAPIVERBARRAY;
  326. #define CbMAPIVerbArray(_c) \
  327. (offsetof(SMAPIVerbArray, aMAPIVerb) + \
  328. (_c)*sizeof(SMAPIVerb))
  329. #define MAPI_IMAPIFORMINFO_METHODS(IPURE) \
  330. MAPIMETHOD(CalcFormPropSet)(THIS_ \
  331. /*in*/ ULONG ulFlags, \
  332. /*out*/ LPMAPIFORMPROPARRAY FAR * ppFormPropArray) IPURE; \
  333. MAPIMETHOD(CalcVerbSet)(THIS_ \
  334. /*in*/ ULONG ulFlags, \
  335. /*out*/ LPMAPIVERBARRAY FAR * ppMAPIVerbArray) IPURE; \
  336. MAPIMETHOD(MakeIconFromBinary)(THIS_ \
  337. /*in*/ ULONG nPropID, \
  338. /*out*/ HICON FAR* phicon) IPURE; \
  339. MAPIMETHOD(SaveForm)(THIS_ \
  340. /*in*/ LPCTSTR szFileName) IPURE; \
  341. MAPIMETHOD(OpenFormContainer)(THIS_ \
  342. /*out*/ LPMAPIFORMCONTAINER FAR * ppformcontainer) IPURE; \
  343. #undef INTERFACE
  344. #define INTERFACE IMAPIFormInfo
  345. DECLARE_MAPI_INTERFACE_(IMAPIFormInfo, IMAPIProp)
  346. {
  347. BEGIN_INTERFACE
  348. MAPI_IUNKNOWN_METHODS(PURE)
  349. MAPI_IMAPIPROP_METHODS(PURE) /* note: subsumes getlasterror */
  350. MAPI_IMAPIFORMINFO_METHODS(PURE)
  351. };
  352. /* Enumeration of permissible values for PR_FORM_MESSAGE_BEHAVIOR */
  353. #define MAPI_MESSAGE_BEHAVIOR_IPM 0
  354. #define MAPI_MESSAGE_BEHAVIOR_FOLDER 1
  355. /*-- IMAPIFormMgr ----------------------------------------------------------*/
  356. /* The client-visible interface for form resolution and dispatch.
  357. */
  358. /* Structure containing an array of message class strings */
  359. typedef struct
  360. {
  361. ULONG cValues;
  362. LPCSTR aMessageClass[MAPI_DIM];
  363. } SMessageClassArray, FAR * LPSMESSAGECLASSARRAY;
  364. #define CbMessageClassArray(_c) \
  365. (offsetof(SMessageClassArray, aMessageClass) + (_c)*sizeof(LPCSTR))
  366. /* Structure containing an array of IMAPIFormInfo interfaces */
  367. typedef struct
  368. {
  369. ULONG cForms;
  370. LPMAPIFORMINFO aFormInfo[MAPI_DIM];
  371. } SMAPIFormInfoArray, FAR * LPSMAPIFORMINFOARRAY;
  372. #define CbMAPIFormInfoArray(_c) \
  373. (offsetof(SMAPIFormInfoArray, aFormInfo) + \
  374. (_c)*sizeof(LPMAPIFORMINFO))
  375. /* Flags for IMAPIFormMgr::SelectFormContainer */
  376. #define MAPIFORM_SELECT_ALL_REGISTRIES 0
  377. #define MAPIFORM_SELECT_FOLDER_REGISTRY_ONLY 1
  378. #define MAPIFORM_SELECT_NON_FOLDER_REGISTRY_ONLY 2
  379. /* Flags for IMAPIFormMgr::CalcFormPropSet */
  380. #define FORMPROPSET_UNION 0
  381. #define FORMPROPSET_INTERSECTION 1
  382. /* Flags for IMAPIFormMgr::ResolveMessageClass and
  383. IMAPIFormMgr::ResolveMultipleMessageClasses */
  384. #define MAPIFORM_EXACTMATCH 0x0020
  385. #define MAPI_IMAPIFORMMGR_METHODS(IPURE) \
  386. MAPIMETHOD(LoadForm)(THIS_ \
  387. /*in*/ ULONG ulUIParam, \
  388. /*in*/ ULONG ulFlags, \
  389. /*in*/ LPCSTR lpszMessageClass, \
  390. /*in*/ ULONG ulMessageStatus, \
  391. /*in*/ ULONG ulMessageFlags, \
  392. /*in*/ LPMAPIFOLDER pFolderFocus, \
  393. /*in*/ LPMAPIMESSAGESITE pMessageSite, \
  394. /*in*/ LPMESSAGE pmsg, \
  395. /*in*/ LPMAPIVIEWCONTEXT pViewContext, \
  396. /*in*/ REFIID riid, \
  397. /*out*/ LPVOID FAR *ppvObj) IPURE; \
  398. MAPIMETHOD(ResolveMessageClass)(THIS_ \
  399. /*in*/ LPCSTR szMsgClass, \
  400. /*in*/ ULONG ulFlags, \
  401. /*in*/ LPMAPIFOLDER pFolderFocus, /* can be null */ \
  402. /*out*/ LPMAPIFORMINFO FAR* ppResult) IPURE; \
  403. MAPIMETHOD(ResolveMultipleMessageClasses)(THIS_ \
  404. /*in*/ LPSMESSAGECLASSARRAY pMsgClasses, \
  405. /*in*/ ULONG ulFlags, \
  406. /*in*/ LPMAPIFOLDER pFolderFocus, /* can be null */ \
  407. /*out*/ LPSMAPIFORMINFOARRAY FAR * pfrminfoarray) IPURE; \
  408. MAPIMETHOD(CalcFormPropSet)(THIS_ \
  409. /*in*/ LPSMAPIFORMINFOARRAY pfrminfoarray, \
  410. /*in*/ ULONG ulFlags, \
  411. /*out*/ LPMAPIFORMPROPARRAY FAR* ppResults) IPURE; \
  412. MAPIMETHOD(CreateForm)(THIS_ \
  413. /*in*/ ULONG ulUIParam, \
  414. /*in*/ ULONG ulFlags, \
  415. /*in*/ LPMAPIFORMINFO pfrminfoToActivate, \
  416. /*in*/ REFIID refiidToAsk, \
  417. /*out*/ LPVOID FAR* ppvObj) IPURE; \
  418. MAPIMETHOD(SelectForm)(THIS_ \
  419. /*in*/ ULONG ulUIParam, \
  420. /*in*/ ULONG ulFlags, \
  421. /*in*/ LPCTSTR pszTitle, \
  422. /*in*/ LPMAPIFOLDER pfld, \
  423. /*out*/ LPMAPIFORMINFO FAR * ppfrminfoReturned) IPURE; \
  424. MAPIMETHOD(SelectMultipleForms)(THIS_ \
  425. /*in*/ ULONG ulUIParam, \
  426. /*in*/ ULONG ulFlags, \
  427. /*in*/ LPCTSTR pszTitle, \
  428. /*in*/ LPMAPIFOLDER pfld, \
  429. /*in*/ LPSMAPIFORMINFOARRAY pfrminfoarray, \
  430. /*out*/ LPSMAPIFORMINFOARRAY FAR * ppfrminfoarray) IPURE; \
  431. MAPIMETHOD(SelectFormContainer)(THIS_ \
  432. /*in*/ ULONG ulUIParam, \
  433. /*in*/ ULONG ulFlags, \
  434. /*out*/ LPMAPIFORMCONTAINER FAR * lppfcnt) IPURE; \
  435. MAPIMETHOD(OpenFormContainer)(THIS_ \
  436. /*in*/ HFRMREG hfrmreg, \
  437. /*in*/ LPUNKNOWN lpunk, \
  438. /*out*/ LPMAPIFORMCONTAINER FAR * lppfcnt) IPURE; \
  439. MAPIMETHOD(PrepareForm)(THIS_ \
  440. /*in*/ ULONG ulUIParam, \
  441. /*in*/ ULONG ulFlags, \
  442. /*in*/ LPMAPIFORMINFO pfrminfo) IPURE; \
  443. MAPIMETHOD(IsInConflict)(THIS_ \
  444. /*in*/ ULONG ulMessageFlags, \
  445. /*in*/ ULONG ulMessageStatus, \
  446. /*in*/ LPCSTR szMessageClass, \
  447. /*in*/ LPMAPIFOLDER pFolderFocus) IPURE; \
  448. #undef INTERFACE
  449. #define INTERFACE IMAPIFormMgr
  450. DECLARE_MAPI_INTERFACE_(IMAPIFormMgr, IUnknown)
  451. {
  452. BEGIN_INTERFACE
  453. MAPI_IUNKNOWN_METHODS(PURE)
  454. MAPI_GETLASTERROR_METHOD(PURE)
  455. MAPI_IMAPIFORMMGR_METHODS(PURE)
  456. };
  457. /* Platform numbers (used in .CFG files for forms) */
  458. #define MAPIFORM_CPU_X86 1
  459. #define MAPIFORM_CPU_MIP 2
  460. #define MAPIFORM_CPU_AXP 3
  461. #define MAPIFORM_CPU_PPC 4
  462. #define MAPIFORM_CPU_M68 5
  463. #define MAPIFORM_OS_WIN_31 1
  464. #define MAPIFORM_OS_WINNT_35 2
  465. #define MAPIFORM_OS_WIN_95 3
  466. #define MAPIFORM_OS_MAC_7x 4
  467. #define MAPIFORM_OS_WINNT_40 5
  468. #define MAPIFORM_PLATFORM(CPU, OS) ((ULONG) ((((ULONG) CPU) << 16) | OS))
  469. /*-- IMAPIFormContainer -------------------------------------------------*/
  470. /* Flags for IMAPIFormMgr::CalcFormPropSet */
  471. /* #define FORMPROPSET_UNION 0 */
  472. /* #define FORMPROPSET_INTERSECTION 1 */
  473. /* Flags for IMAPIFormMgr::InstallForm */
  474. #define MAPIFORM_INSTALL_DIALOG MAPI_DIALOG
  475. #define MAPIFORM_INSTALL_OVERWRITEONCONFLICT 0x0010
  476. /* Flags for IMAPIFormContainer::ResolveMessageClass and
  477. IMAPIFormContainer::ResolveMultipleMessageClasses */
  478. /* #define MAPIFORM_EXACTIMATCH 0x0020 */
  479. #define MAPI_IMAPIFORMCONTAINER_METHODS(IPURE) \
  480. MAPIMETHOD(InstallForm)(THIS_ \
  481. /*in*/ ULONG ulUIParam, \
  482. /*in*/ ULONG ulFlags, \
  483. /*in*/ LPCTSTR szCfgPathName) IPURE; \
  484. MAPIMETHOD(RemoveForm)(THIS_ \
  485. /*in*/ LPCSTR szMessageClass) IPURE; \
  486. MAPIMETHOD(ResolveMessageClass) (THIS_ \
  487. /*in*/ LPCSTR szMessageClass, \
  488. /*in*/ ULONG ulFlags, \
  489. /*out*/ LPMAPIFORMINFO FAR * pforminfo) IPURE; \
  490. MAPIMETHOD(ResolveMultipleMessageClasses) (THIS_ \
  491. /*in*/ LPSMESSAGECLASSARRAY pMsgClassArray, \
  492. /*in*/ ULONG ulFlags, \
  493. /*out*/ LPSMAPIFORMINFOARRAY FAR * ppfrminfoarray) IPURE; \
  494. MAPIMETHOD(CalcFormPropSet)(THIS_ \
  495. /*in*/ ULONG ulFlags, \
  496. /*out*/ LPMAPIFORMPROPARRAY FAR * ppResults) IPURE; \
  497. MAPIMETHOD(GetDisplay)(THIS_ \
  498. /*in*/ ULONG ulFlags, \
  499. /*out*/ LPTSTR FAR * pszDisplayName) IPURE; \
  500. #undef INTERFACE
  501. #define INTERFACE IMAPIFormContainer
  502. DECLARE_MAPI_INTERFACE_(IMAPIFormContainer, IUnknown)
  503. {
  504. BEGIN_INTERFACE
  505. MAPI_IUNKNOWN_METHODS(PURE)
  506. MAPI_GETLASTERROR_METHOD(PURE)
  507. MAPI_IMAPIFORMCONTAINER_METHODS(PURE)
  508. };
  509. /*-- IMAPIFormFactory ------------------------------------------------------*/
  510. #define MAPI_IMAPIFORMFACTORY_METHODS(IPURE) \
  511. MAPIMETHOD(CreateClassFactory) (THIS_ \
  512. /*in*/ REFCLSID clsidForm, \
  513. /*in*/ ULONG ulFlags, \
  514. /*out*/ LPCLASSFACTORY FAR * lppClassFactory) IPURE; \
  515. MAPIMETHOD(LockServer) (THIS_ \
  516. /*in*/ ULONG ulFlags, \
  517. /*in*/ ULONG fLockServer) IPURE; \
  518. #undef INTERFACE
  519. #define INTERFACE IMAPIFormFactory
  520. DECLARE_MAPI_INTERFACE_(IMAPIFormFactory, IUnknown)
  521. {
  522. BEGIN_INTERFACE
  523. MAPI_IUNKNOWN_METHODS(PURE)
  524. MAPI_GETLASTERROR_METHOD(PURE)
  525. MAPI_IMAPIFORMFACTORY_METHODS(PURE)
  526. };
  527. #endif /* MAPIFORM_H */
  528.