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.

2653 lines
80 KiB

  1. /*
  2. * M A P I D E F S . H
  3. *
  4. * Definitions used by MAPI clients and service providers.
  5. *
  6. * Copyright 1986-1999 Microsoft Corporation. All Rights Reserved.
  7. */
  8. #ifndef MAPIDEFS_H
  9. #define MAPIDEFS_H
  10. #if _MSC_VER > 1000
  11. #pragma once
  12. #endif
  13. #if defined (WIN32) && !defined (_WIN32)
  14. #define _WIN32
  15. #endif
  16. #if defined (_WIN32) /* Must include WINDOWS.H on Win32 */
  17. #ifndef _WINDOWS_
  18. #define INC_OLE2 /* Get the OLE2 stuff */
  19. #define INC_RPC /* harmless on Windows NT; Windows 95 needs it */
  20. #define _INC_OLE /* Windows 95 will include OLE1 without this */
  21. #include <windows.h>
  22. #endif
  23. #ifndef _OLEERROR_H_
  24. #include <winerror.h>
  25. #endif
  26. #ifndef _OBJBASE_H_
  27. #include <objbase.h>
  28. #endif
  29. #endif
  30. #if defined (WIN16) || defined (DOS) || defined (DOS16)
  31. #ifndef _COMPOBJ_H_
  32. #include <compobj.h>
  33. #endif
  34. #endif
  35. #ifndef _INC_STDDEF
  36. #include <stddef.h>
  37. #endif
  38. /* Array dimension for structures with variable-sized arrays at the end. */
  39. #ifndef MAPI_DIM
  40. #define MAPI_DIM 1
  41. #endif
  42. /* Provider init type. Force to cdecl always */
  43. #ifndef STDMAPIINITCALLTYPE
  44. #if !defined (_MAC) && defined (_WIN32)
  45. #define STDMAPIINITCALLTYPE __cdecl
  46. #else
  47. #define STDMAPIINITCALLTYPE STDMETHODCALLTYPE
  48. #endif
  49. #define STDINITMETHODIMP HRESULT STDMAPIINITCALLTYPE
  50. #define STDINITMETHODIMP_(type) type STDMAPIINITCALLTYPE
  51. #endif
  52. #define MAPI_NT_SERVICE ((ULONG) 0x00010000) /* Provider is being loaded in an NT service */
  53. #ifdef __cplusplus
  54. extern "C" {
  55. #endif
  56. /* Simple data types */
  57. #if !defined (MIDL_PASS) /* MIDL doesn't want to see these */
  58. typedef WORD WCHAR;
  59. #ifdef UNICODE
  60. typedef WCHAR TCHAR;
  61. #else
  62. typedef char TCHAR;
  63. #endif
  64. typedef WCHAR FAR * LPWSTR;
  65. typedef const WCHAR FAR * LPCWSTR;
  66. typedef TCHAR FAR * LPTSTR;
  67. typedef const TCHAR FAR * LPCTSTR;
  68. typedef BYTE FAR * LPBYTE;
  69. #endif /* defined MIDL_PASS */
  70. typedef ULONG FAR * LPULONG;
  71. #ifndef __LHANDLE
  72. #define __LHANDLE
  73. typedef ULONG_PTR LHANDLE, FAR * LPLHANDLE;
  74. #endif
  75. #if !defined(_WINBASE_) && !defined(_FILETIME_)
  76. #define _FILETIME_
  77. typedef struct _FILETIME
  78. {
  79. DWORD dwLowDateTime;
  80. DWORD dwHighDateTime;
  81. } FILETIME, FAR * LPFILETIME;
  82. #endif
  83. #ifndef BEGIN_INTERFACE
  84. #define BEGIN_INTERFACE
  85. #endif
  86. /*
  87. * This flag is used in many different MAPI calls to signify that
  88. * the object opened by the call should be modifiable (MAPI_MODIFY).
  89. * If the flag MAPI_MAX_ACCESS is set, the object returned should be
  90. * returned at the maximum access level allowed. An additional
  91. * property available on the object (PR_ACCESS_LEVEL) uses the same
  92. * MAPI_MODIFY flag to say just what this new access level is.
  93. */
  94. #define MAPI_MODIFY ((ULONG) 0x00000001)
  95. /*
  96. * The following flags are used to indicate to the client what access
  97. * level is permissible in the object. They appear in PR_ACCESS in
  98. * message and folder objects as well as in contents and associated
  99. * contents tables
  100. */
  101. #define MAPI_ACCESS_MODIFY ((ULONG) 0x00000001)
  102. #define MAPI_ACCESS_READ ((ULONG) 0x00000002)
  103. #define MAPI_ACCESS_DELETE ((ULONG) 0x00000004)
  104. #define MAPI_ACCESS_CREATE_HIERARCHY ((ULONG) 0x00000008)
  105. #define MAPI_ACCESS_CREATE_CONTENTS ((ULONG) 0x00000010)
  106. #define MAPI_ACCESS_CREATE_ASSOCIATED ((ULONG) 0x00000020)
  107. /*
  108. * The MAPI_UNICODE flag is used in many different MAPI calls to signify
  109. * that strings passed through the interface are in Unicode (a 16-bit
  110. * character set). The default is an 8-bit character set.
  111. *
  112. * The value fMapiUnicode can be used as the 'normal' value for
  113. * that bit, given the application's default character set.
  114. */
  115. #define MAPI_UNICODE ((ULONG) 0x80000000)
  116. #ifdef UNICODE
  117. #define fMapiUnicode MAPI_UNICODE
  118. #else
  119. #define fMapiUnicode 0
  120. #endif
  121. /* successful HRESULT */
  122. #define hrSuccess 0
  123. /* Recipient types */
  124. #ifndef MAPI_ORIG /* also defined in mapi.h */
  125. #define MAPI_ORIG 0 /* Recipient is message originator */
  126. #define MAPI_TO 1 /* Recipient is a primary recipient */
  127. #define MAPI_CC 2 /* Recipient is a copy recipient */
  128. #define MAPI_BCC 3 /* Recipient is blind copy recipient */
  129. #define MAPI_P1 0x10000000 /* Recipient is a P1 resend recipient */
  130. #define MAPI_SUBMITTED 0x80000000 /* Recipient is already processed */
  131. /* #define MAPI_AUTHORIZE 4 recipient is a CMC authorizing user */
  132. /*#define MAPI_DISCRETE 0x10000000 Recipient is a P1 resend recipient */
  133. #endif
  134. /* Bit definitions for abFlags[0] of ENTRYID */
  135. #define MAPI_SHORTTERM 0x80
  136. #define MAPI_NOTRECIP 0x40
  137. #define MAPI_THISSESSION 0x20
  138. #define MAPI_NOW 0x10
  139. #define MAPI_NOTRESERVED 0x08
  140. /* Bit definitions for abFlags[1] of ENTRYID */
  141. #define MAPI_COMPOUND 0x80
  142. /* ENTRYID */
  143. typedef struct
  144. {
  145. BYTE abFlags[4];
  146. BYTE ab[MAPI_DIM];
  147. } ENTRYID, FAR *LPENTRYID;
  148. #define CbNewENTRYID(_cb) (offsetof(ENTRYID,ab) + (_cb))
  149. #define CbENTRYID(_cb) (offsetof(ENTRYID,ab) + (_cb))
  150. #define SizedENTRYID(_cb, _name) \
  151. struct _ENTRYID_ ## _name \
  152. { \
  153. BYTE abFlags[4]; \
  154. BYTE ab[_cb]; \
  155. } _name
  156. /* Byte-order-independent version of GUID (world-unique identifier) */
  157. typedef struct _MAPIUID
  158. {
  159. BYTE ab[16];
  160. } MAPIUID, FAR * LPMAPIUID;
  161. /* Note: need to include C run-times (memory.h) to use this macro */
  162. #define IsEqualMAPIUID(lpuid1, lpuid2) (!memcmp(lpuid1, lpuid2, sizeof(MAPIUID)))
  163. /*
  164. * Constants for one-off entry ID:
  165. * The MAPIUID that identifies the one-off provider;
  166. * the flag that defines whether the embedded strings are Unicode;
  167. * the flag that specifies whether the recipient gets TNEF or not.
  168. */
  169. #define MAPI_ONE_OFF_UID { 0x81, 0x2b, 0x1f, 0xa4, 0xbe, 0xa3, 0x10, 0x19, \
  170. 0x9d, 0x6e, 0x00, 0xdd, 0x01, 0x0f, 0x54, 0x02 }
  171. #define MAPI_ONE_OFF_UNICODE 0x8000
  172. #define MAPI_ONE_OFF_NO_RICH_INFO 0x0001
  173. /* Object type */
  174. #define MAPI_STORE ((ULONG) 0x00000001) /* Message Store */
  175. #define MAPI_ADDRBOOK ((ULONG) 0x00000002) /* Address Book */
  176. #define MAPI_FOLDER ((ULONG) 0x00000003) /* Folder */
  177. #define MAPI_ABCONT ((ULONG) 0x00000004) /* Address Book Container */
  178. #define MAPI_MESSAGE ((ULONG) 0x00000005) /* Message */
  179. #define MAPI_MAILUSER ((ULONG) 0x00000006) /* Individual Recipient */
  180. #define MAPI_ATTACH ((ULONG) 0x00000007) /* Attachment */
  181. #define MAPI_DISTLIST ((ULONG) 0x00000008) /* Distribution List Recipient */
  182. #define MAPI_PROFSECT ((ULONG) 0x00000009) /* Profile Section */
  183. #define MAPI_STATUS ((ULONG) 0x0000000A) /* Status Object */
  184. #define MAPI_SESSION ((ULONG) 0x0000000B) /* Session */
  185. #define MAPI_FORMINFO ((ULONG) 0x0000000C) /* Form Information */
  186. /*
  187. * Maximum length of profile names and passwords, not including
  188. * the null termination character.
  189. */
  190. #ifndef cchProfileNameMax
  191. #define cchProfileNameMax 64
  192. #define cchProfilePassMax 64
  193. #endif
  194. /* Property Types */
  195. #define MV_FLAG 0x1000 /* Multi-value flag */
  196. #define PT_UNSPECIFIED ((ULONG) 0) /* (Reserved for interface use) type doesn't matter to caller */
  197. #define PT_NULL ((ULONG) 1) /* NULL property value */
  198. #define PT_I2 ((ULONG) 2) /* Signed 16-bit value */
  199. #define PT_LONG ((ULONG) 3) /* Signed 32-bit value */
  200. #define PT_R4 ((ULONG) 4) /* 4-byte floating point */
  201. #define PT_DOUBLE ((ULONG) 5) /* Floating point double */
  202. #define PT_CURRENCY ((ULONG) 6) /* Signed 64-bit int (decimal w/ 4 digits right of decimal pt) */
  203. #define PT_APPTIME ((ULONG) 7) /* Application time */
  204. #define PT_ERROR ((ULONG) 10) /* 32-bit error value */
  205. #define PT_BOOLEAN ((ULONG) 11) /* 16-bit boolean (non-zero true) */
  206. #define PT_OBJECT ((ULONG) 13) /* Embedded object in a property */
  207. #define PT_I8 ((ULONG) 20) /* 8-byte signed integer */
  208. #define PT_STRING8 ((ULONG) 30) /* Null terminated 8-bit character string */
  209. #define PT_UNICODE ((ULONG) 31) /* Null terminated Unicode string */
  210. #define PT_SYSTIME ((ULONG) 64) /* FILETIME 64-bit int w/ number of 100ns periods since Jan 1,1601 */
  211. #define PT_CLSID ((ULONG) 72) /* OLE GUID */
  212. #define PT_BINARY ((ULONG) 258) /* Uninterpreted (counted byte array) */
  213. /* Changes are likely to these numbers, and to their structures. */
  214. /* Alternate property type names for ease of use */
  215. #define PT_SHORT PT_I2
  216. #define PT_I4 PT_LONG
  217. #define PT_FLOAT PT_R4
  218. #define PT_R8 PT_DOUBLE
  219. #define PT_LONGLONG PT_I8
  220. /*
  221. * The type of a MAPI-defined string property is indirected, so
  222. * that it defaults to Unicode string on a Unicode platform and to
  223. * String8 on an ANSI or DBCS platform.
  224. *
  225. * Macros are defined here both for the property type, and for the
  226. * field of the property value structure which should be
  227. * dereferenced to obtain the string pointer.
  228. */
  229. #ifdef UNICODE
  230. #define PT_TSTRING PT_UNICODE
  231. #define PT_MV_TSTRING (MV_FLAG|PT_UNICODE)
  232. #define LPSZ lpszW
  233. #define LPPSZ lppszW
  234. #define MVSZ MVszW
  235. #else
  236. #define PT_TSTRING PT_STRING8
  237. #define PT_MV_TSTRING (MV_FLAG|PT_STRING8)
  238. #define LPSZ lpszA
  239. #define LPPSZ lppszA
  240. #define MVSZ MVszA
  241. #endif
  242. /* Property Tags
  243. *
  244. * By convention, MAPI never uses 0 or FFFF as a property ID.
  245. * Use as null values, initializers, sentinels, or what have you.
  246. */
  247. #define PROP_TYPE_MASK ((ULONG)0x0000FFFF) /* Mask for Property type */
  248. #define PROP_TYPE(ulPropTag) (((ULONG)(ulPropTag))&PROP_TYPE_MASK)
  249. #define PROP_ID(ulPropTag) (((ULONG)(ulPropTag))>>16)
  250. #define PROP_TAG(ulPropType,ulPropID) ((((ULONG)(ulPropID))<<16)|((ULONG)(ulPropType)))
  251. #define PROP_ID_NULL 0
  252. #define PROP_ID_INVALID 0xFFFF
  253. #define PR_NULL PROP_TAG( PT_NULL, PROP_ID_NULL)
  254. #define CHANGE_PROP_TYPE(ulPropTag, ulPropType) \
  255. (((ULONG)0xFFFF0000 & ulPropTag) | ulPropType)
  256. /* Multi-valued Property Types */
  257. #define PT_MV_I2 (MV_FLAG|PT_I2)
  258. #define PT_MV_LONG (MV_FLAG|PT_LONG)
  259. #define PT_MV_R4 (MV_FLAG|PT_R4)
  260. #define PT_MV_DOUBLE (MV_FLAG|PT_DOUBLE)
  261. #define PT_MV_CURRENCY (MV_FLAG|PT_CURRENCY)
  262. #define PT_MV_APPTIME (MV_FLAG|PT_APPTIME)
  263. #define PT_MV_SYSTIME (MV_FLAG|PT_SYSTIME)
  264. #define PT_MV_STRING8 (MV_FLAG|PT_STRING8)
  265. #define PT_MV_BINARY (MV_FLAG|PT_BINARY)
  266. #define PT_MV_UNICODE (MV_FLAG|PT_UNICODE)
  267. #define PT_MV_CLSID (MV_FLAG|PT_CLSID)
  268. #define PT_MV_I8 (MV_FLAG|PT_I8)
  269. /* Alternate property type names for ease of use */
  270. #define PT_MV_SHORT PT_MV_I2
  271. #define PT_MV_I4 PT_MV_LONG
  272. #define PT_MV_FLOAT PT_MV_R4
  273. #define PT_MV_R8 PT_MV_DOUBLE
  274. #define PT_MV_LONGLONG PT_MV_I8
  275. /*
  276. * Property type reserved bits
  277. *
  278. * MV_INSTANCE is used as a flag in table operations to request
  279. * that a multi-valued property be presented as a single-valued
  280. * property appearing in multiple rows.
  281. */
  282. #define MV_INSTANCE 0x2000
  283. #define MVI_FLAG (MV_FLAG | MV_INSTANCE)
  284. #define MVI_PROP(tag) ((tag) | MVI_FLAG)
  285. /* --------------- */
  286. /* Data Structures */
  287. /* --------------- */
  288. /* Property Tag Array */
  289. typedef struct _SPropTagArray
  290. {
  291. ULONG cValues;
  292. ULONG aulPropTag[MAPI_DIM];
  293. } SPropTagArray, FAR * LPSPropTagArray;
  294. #define CbNewSPropTagArray(_ctag) \
  295. (offsetof(SPropTagArray,aulPropTag) + (_ctag)*sizeof(ULONG))
  296. #define CbSPropTagArray(_lparray) \
  297. (offsetof(SPropTagArray,aulPropTag) + \
  298. (UINT)((_lparray)->cValues)*sizeof(ULONG))
  299. /* SPropTagArray */
  300. #define SizedSPropTagArray(_ctag, _name) \
  301. struct _SPropTagArray_ ## _name \
  302. { \
  303. ULONG cValues; \
  304. ULONG aulPropTag[_ctag]; \
  305. } _name
  306. /* -------------- */
  307. /* Property Value */
  308. /* -------------- */
  309. typedef struct _SPropValue SPropValue;
  310. /* 32-bit CURRENCY definition stolen from oaidl.h */
  311. /* 16-bit CURRENCY definition stolen from variant.h */
  312. #ifndef _tagCY_DEFINED
  313. #define _tagCY_DEFINED
  314. #define _CY_DEFINED
  315. #if (defined (WIN16) || defined (DOS)) && !defined (_VARIANT_H_)
  316. typedef struct FARSTRUCT tagCY {
  317. #ifdef _MAC
  318. long Hi;
  319. long Lo;
  320. #else
  321. unsigned long Lo;
  322. long Hi;
  323. #endif
  324. } CY;
  325. #elif defined (_WIN32)
  326. /* real definition that makes the C++ compiler happy */
  327. typedef union tagCY {
  328. struct {
  329. #ifdef _MAC
  330. long Hi;
  331. long Lo;
  332. #else
  333. unsigned long Lo;
  334. long Hi;
  335. #endif
  336. };
  337. LONGLONG int64;
  338. } CY;
  339. #endif /* 16-bit vs 32-bit definition */
  340. #endif
  341. /* size is 8 */
  342. typedef CY CURRENCY;
  343. typedef struct _SBinary
  344. {
  345. ULONG cb;
  346. LPBYTE lpb;
  347. } SBinary, FAR *LPSBinary;
  348. typedef struct _SShortArray
  349. {
  350. ULONG cValues;
  351. short int FAR *lpi;
  352. } SShortArray;
  353. typedef struct _SGuidArray
  354. {
  355. ULONG cValues;
  356. GUID FAR *lpguid;
  357. } SGuidArray;
  358. typedef struct _SRealArray
  359. {
  360. ULONG cValues;
  361. float FAR *lpflt;
  362. } SRealArray;
  363. typedef struct _SLongArray
  364. {
  365. ULONG cValues;
  366. LONG FAR *lpl;
  367. } SLongArray;
  368. typedef struct _SLargeIntegerArray
  369. {
  370. ULONG cValues;
  371. LARGE_INTEGER FAR *lpli;
  372. } SLargeIntegerArray;
  373. typedef struct _SDateTimeArray
  374. {
  375. ULONG cValues;
  376. FILETIME FAR *lpft;
  377. } SDateTimeArray;
  378. typedef struct _SAppTimeArray
  379. {
  380. ULONG cValues;
  381. double FAR *lpat;
  382. } SAppTimeArray;
  383. typedef struct _SCurrencyArray
  384. {
  385. ULONG cValues;
  386. CURRENCY FAR *lpcur;
  387. } SCurrencyArray;
  388. typedef struct _SBinaryArray
  389. {
  390. ULONG cValues;
  391. SBinary FAR *lpbin;
  392. } SBinaryArray;
  393. typedef struct _SDoubleArray
  394. {
  395. ULONG cValues;
  396. double FAR *lpdbl;
  397. } SDoubleArray;
  398. typedef struct _SWStringArray
  399. {
  400. ULONG cValues;
  401. LPWSTR FAR *lppszW;
  402. } SWStringArray;
  403. typedef struct _SLPSTRArray
  404. {
  405. ULONG cValues;
  406. LPSTR FAR *lppszA;
  407. } SLPSTRArray;
  408. typedef union _PV
  409. {
  410. short int i; /* case PT_I2 */
  411. LONG l; /* case PT_LONG */
  412. ULONG ul; /* alias for PT_LONG */
  413. float flt; /* case PT_R4 */
  414. double dbl; /* case PT_DOUBLE */
  415. unsigned short int b; /* case PT_BOOLEAN */
  416. CURRENCY cur; /* case PT_CURRENCY */
  417. double at; /* case PT_APPTIME */
  418. FILETIME ft; /* case PT_SYSTIME */
  419. LPSTR lpszA; /* case PT_STRING8 */
  420. SBinary bin; /* case PT_BINARY */
  421. LPWSTR lpszW; /* case PT_UNICODE */
  422. LPGUID lpguid; /* case PT_CLSID */
  423. LARGE_INTEGER li; /* case PT_I8 */
  424. SShortArray MVi; /* case PT_MV_I2 */
  425. SLongArray MVl; /* case PT_MV_LONG */
  426. SRealArray MVflt; /* case PT_MV_R4 */
  427. SDoubleArray MVdbl; /* case PT_MV_DOUBLE */
  428. SCurrencyArray MVcur; /* case PT_MV_CURRENCY */
  429. SAppTimeArray MVat; /* case PT_MV_APPTIME */
  430. SDateTimeArray MVft; /* case PT_MV_SYSTIME */
  431. SBinaryArray MVbin; /* case PT_MV_BINARY */
  432. SLPSTRArray MVszA; /* case PT_MV_STRING8 */
  433. SWStringArray MVszW; /* case PT_MV_UNICODE */
  434. SGuidArray MVguid; /* case PT_MV_CLSID */
  435. SLargeIntegerArray MVli; /* case PT_MV_I8 */
  436. SCODE err; /* case PT_ERROR */
  437. LONG x; /* case PT_NULL, PT_OBJECT (no usable value) */
  438. } __UPV;
  439. typedef struct _SPropValue
  440. {
  441. ULONG ulPropTag;
  442. ULONG dwAlignPad;
  443. union _PV Value;
  444. } SPropValue, FAR * LPSPropValue;
  445. /* --------------------------------------------- */
  446. /* Property Problem and Property Problem Arrays */
  447. /* --------------------------------------------- */
  448. typedef struct _SPropProblem
  449. {
  450. ULONG ulIndex;
  451. ULONG ulPropTag;
  452. SCODE scode;
  453. } SPropProblem, FAR * LPSPropProblem;
  454. typedef struct _SPropProblemArray
  455. {
  456. ULONG cProblem;
  457. SPropProblem aProblem[MAPI_DIM];
  458. } SPropProblemArray, FAR * LPSPropProblemArray;
  459. #define CbNewSPropProblemArray(_cprob) \
  460. (offsetof(SPropProblemArray,aProblem) + (_cprob)*sizeof(SPropProblem))
  461. #define CbSPropProblemArray(_lparray) \
  462. (offsetof(SPropProblemArray,aProblem) + \
  463. (UINT) ((_lparray)->cProblem*sizeof(SPropProblem)))
  464. #define SizedSPropProblemArray(_cprob, _name) \
  465. struct _SPropProblemArray_ ## _name \
  466. { \
  467. ULONG cProblem; \
  468. SPropProblem aProblem[_cprob]; \
  469. } _name
  470. /*
  471. * ENTRYLIST
  472. */
  473. typedef SBinaryArray ENTRYLIST, FAR *LPENTRYLIST;
  474. /*
  475. * FLATENTRYLIST
  476. * MTSID
  477. * FLATMTSIDLIST
  478. */
  479. typedef struct {
  480. ULONG cb;
  481. BYTE abEntry[MAPI_DIM];
  482. } FLATENTRY, FAR *LPFLATENTRY;
  483. typedef struct {
  484. ULONG cEntries;
  485. ULONG cbEntries;
  486. BYTE abEntries[MAPI_DIM];
  487. } FLATENTRYLIST, FAR *LPFLATENTRYLIST;
  488. typedef struct {
  489. ULONG cb;
  490. BYTE ab[MAPI_DIM];
  491. } MTSID, FAR *LPMTSID;
  492. typedef struct {
  493. ULONG cMTSIDs;
  494. ULONG cbMTSIDs;
  495. BYTE abMTSIDs[MAPI_DIM];
  496. } FLATMTSIDLIST, FAR *LPFLATMTSIDLIST;
  497. #define CbNewFLATENTRY(_cb) (offsetof(FLATENTRY,abEntry) + (_cb))
  498. #define CbFLATENTRY(_lpentry) (offsetof(FLATENTRY,abEntry) + (_lpentry)->cb)
  499. #define CbNewFLATENTRYLIST(_cb) (offsetof(FLATENTRYLIST,abEntries) + (_cb))
  500. #define CbFLATENTRYLIST(_lplist) (offsetof(FLATENTRYLIST,abEntries) + (_lplist)->cbEntries)
  501. #define CbNewMTSID(_cb) (offsetof(MTSID,ab) + (_cb))
  502. #define CbMTSID(_lpentry) (offsetof(MTSID,ab) + (_lpentry)->cb)
  503. #define CbNewFLATMTSIDLIST(_cb) (offsetof(FLATMTSIDLIST,abMTSIDs) + (_cb))
  504. #define CbFLATMTSIDLIST(_lplist) (offsetof(FLATMTSIDLIST,abMTSIDs) + (_lplist)->cbMTSIDs)
  505. /* No SizedXXX macros for these types. */
  506. /* ------------------------------ */
  507. /* ADRENTRY, ADRLIST */
  508. typedef struct _ADRENTRY
  509. {
  510. ULONG ulReserved1; /* Never used */
  511. ULONG cValues;
  512. LPSPropValue rgPropVals;
  513. } ADRENTRY, FAR * LPADRENTRY;
  514. typedef struct _ADRLIST
  515. {
  516. ULONG cEntries;
  517. ADRENTRY aEntries[MAPI_DIM];
  518. } ADRLIST, FAR * LPADRLIST;
  519. #define CbNewADRLIST(_centries) \
  520. (offsetof(ADRLIST,aEntries) + (_centries)*sizeof(ADRENTRY))
  521. #define CbADRLIST(_lpadrlist) \
  522. (offsetof(ADRLIST,aEntries) + (UINT)(_lpadrlist)->cEntries*sizeof(ADRENTRY))
  523. #define SizedADRLIST(_centries, _name) \
  524. struct _ADRLIST_ ## _name \
  525. { \
  526. ULONG cEntries; \
  527. ADRENTRY aEntries[_centries]; \
  528. } _name
  529. /* ------------------------------ */
  530. /* SRow, SRowSet */
  531. typedef struct _SRow
  532. {
  533. ULONG ulAdrEntryPad; /* Pad so SRow's can map to ADRENTRY's */
  534. ULONG cValues; /* Count of property values */
  535. LPSPropValue lpProps; /* Property value array */
  536. } SRow, FAR * LPSRow;
  537. typedef struct _SRowSet
  538. {
  539. ULONG cRows; /* Count of rows */
  540. SRow aRow[MAPI_DIM]; /* Array of rows */
  541. } SRowSet, FAR * LPSRowSet;
  542. #define CbNewSRowSet(_crow) (offsetof(SRowSet,aRow) + (_crow)*sizeof(SRow))
  543. #define CbSRowSet(_lprowset) (offsetof(SRowSet,aRow) + \
  544. (UINT)((_lprowset)->cRows*sizeof(SRow)))
  545. #define SizedSRowSet(_crow, _name) \
  546. struct _SRowSet_ ## _name \
  547. { \
  548. ULONG cRows; \
  549. SRow aRow[_crow]; \
  550. } _name
  551. /* MAPI Allocation Routines ------------------------------------------------ */
  552. typedef SCODE (STDMETHODCALLTYPE ALLOCATEBUFFER)(
  553. ULONG cbSize,
  554. LPVOID FAR * lppBuffer
  555. );
  556. typedef SCODE (STDMETHODCALLTYPE ALLOCATEMORE)(
  557. ULONG cbSize,
  558. LPVOID lpObject,
  559. LPVOID FAR * lppBuffer
  560. );
  561. typedef ULONG (STDAPICALLTYPE FREEBUFFER)(
  562. LPVOID lpBuffer
  563. );
  564. typedef ALLOCATEBUFFER FAR *LPALLOCATEBUFFER;
  565. typedef ALLOCATEMORE FAR * LPALLOCATEMORE;
  566. typedef FREEBUFFER FAR * LPFREEBUFFER;
  567. /* MAPI Component Object Model Macros -------------------------------------- */
  568. #if defined(MAPI_IF) && (!defined(__cplusplus) || defined(CINTERFACE))
  569. #define DECLARE_MAPI_INTERFACE(iface) \
  570. typedef struct iface##Vtbl iface##Vtbl, FAR * iface; \
  571. struct iface##Vtbl
  572. #define DECLARE_MAPI_INTERFACE_(iface, baseiface) \
  573. DECLARE_MAPI_INTERFACE(iface)
  574. #define DECLARE_MAPI_INTERFACE_PTR(iface, piface) \
  575. typedef struct iface##Vtbl iface##Vtbl, FAR * iface, FAR * FAR * piface;
  576. #else
  577. #define DECLARE_MAPI_INTERFACE(iface) \
  578. DECLARE_INTERFACE(iface)
  579. #define DECLARE_MAPI_INTERFACE_(iface, baseiface) \
  580. DECLARE_INTERFACE_(iface, baseiface)
  581. #ifdef __cplusplus
  582. #define DECLARE_MAPI_INTERFACE_PTR(iface, piface) \
  583. interface iface; typedef iface FAR * piface
  584. #else
  585. #define DECLARE_MAPI_INTERFACE_PTR(iface, piface) \
  586. typedef interface iface iface, FAR * piface
  587. #endif
  588. #endif
  589. #define MAPIMETHOD(method) MAPIMETHOD_(HRESULT, method)
  590. #define MAPIMETHOD_(type, method) STDMETHOD_(type, method)
  591. #define MAPIMETHOD_DECLARE(type, method, prefix) \
  592. STDMETHODIMP_(type) prefix##method
  593. #define MAPIMETHOD_TYPEDEF(type, method, prefix) \
  594. typedef type (STDMETHODCALLTYPE prefix##method##_METHOD)
  595. #define MAPI_IUNKNOWN_METHODS(IPURE) \
  596. MAPIMETHOD(QueryInterface) \
  597. (THIS_ REFIID riid, LPVOID FAR * ppvObj) IPURE; \
  598. MAPIMETHOD_(ULONG,AddRef) (THIS) IPURE; \
  599. MAPIMETHOD_(ULONG,Release) (THIS) IPURE; \
  600. #undef IMPL
  601. #define IMPL
  602. /* Pointers to MAPI Interfaces --------------------------------------------- */
  603. typedef const IID FAR * LPCIID;
  604. DECLARE_MAPI_INTERFACE_PTR(IMsgStore, LPMDB);
  605. DECLARE_MAPI_INTERFACE_PTR(IMAPIFolder, LPMAPIFOLDER);
  606. DECLARE_MAPI_INTERFACE_PTR(IMessage, LPMESSAGE);
  607. DECLARE_MAPI_INTERFACE_PTR(IAttach, LPATTACH);
  608. DECLARE_MAPI_INTERFACE_PTR(IAddrBook, LPADRBOOK);
  609. DECLARE_MAPI_INTERFACE_PTR(IABContainer, LPABCONT);
  610. DECLARE_MAPI_INTERFACE_PTR(IMailUser, LPMAILUSER);
  611. DECLARE_MAPI_INTERFACE_PTR(IDistList, LPDISTLIST);
  612. DECLARE_MAPI_INTERFACE_PTR(IMAPIStatus, LPMAPISTATUS);
  613. DECLARE_MAPI_INTERFACE_PTR(IMAPITable, LPMAPITABLE);
  614. DECLARE_MAPI_INTERFACE_PTR(IProfSect, LPPROFSECT);
  615. DECLARE_MAPI_INTERFACE_PTR(IMAPIProp, LPMAPIPROP);
  616. DECLARE_MAPI_INTERFACE_PTR(IMAPIContainer, LPMAPICONTAINER);
  617. DECLARE_MAPI_INTERFACE_PTR(IMAPIAdviseSink, LPMAPIADVISESINK);
  618. DECLARE_MAPI_INTERFACE_PTR(IMAPIProgress, LPMAPIPROGRESS);
  619. DECLARE_MAPI_INTERFACE_PTR(IProviderAdmin, LPPROVIDERADMIN);
  620. /* Extended MAPI Error Information ----------------------------------------- */
  621. typedef struct _MAPIERROR
  622. {
  623. ULONG ulVersion;
  624. LPTSTR lpszError;
  625. LPTSTR lpszComponent;
  626. ULONG ulLowLevelError;
  627. ULONG ulContext;
  628. } MAPIERROR, FAR * LPMAPIERROR;
  629. /* IMAPIAdviseSink Interface ----------------------------------------------- */
  630. /*
  631. * Notification event types. The event types can be combined in a bitmask
  632. * for filtering. Each one has a parameter structure associated with it:
  633. *
  634. * fnevCriticalError ERROR_NOTIFICATION
  635. * fnevNewMail NEWMAIL_NOTIFICATION
  636. * fnevObjectCreated OBJECT_NOTIFICATION
  637. * fnevObjectDeleted OBJECT_NOTIFICATION
  638. * fnevObjectModified OBJECT_NOTIFICATION
  639. * fnevObjectCopied OBJECT_NOTIFICATION
  640. * fnevSearchComplete OBJECT_NOTIFICATION
  641. * fnevTableModified TABLE_NOTIFICATION
  642. * fnevStatusObjectModified ?
  643. *
  644. * fnevExtended EXTENDED_NOTIFICATION
  645. */
  646. #define fnevCriticalError ((ULONG) 0x00000001)
  647. #define fnevNewMail ((ULONG) 0x00000002)
  648. #define fnevObjectCreated ((ULONG) 0x00000004)
  649. #define fnevObjectDeleted ((ULONG) 0x00000008)
  650. #define fnevObjectModified ((ULONG) 0x00000010)
  651. #define fnevObjectMoved ((ULONG) 0x00000020)
  652. #define fnevObjectCopied ((ULONG) 0x00000040)
  653. #define fnevSearchComplete ((ULONG) 0x00000080)
  654. #define fnevTableModified ((ULONG) 0x00000100)
  655. #define fnevStatusObjectModified ((ULONG) 0x00000200)
  656. #define fnevReservedForMapi ((ULONG) 0x40000000)
  657. #define fnevExtended ((ULONG) 0x80000000)
  658. /* TABLE_NOTIFICATION event types passed in ulTableEvent */
  659. #define TABLE_CHANGED 1
  660. #define TABLE_ERROR 2
  661. #define TABLE_ROW_ADDED 3
  662. #define TABLE_ROW_DELETED 4
  663. #define TABLE_ROW_MODIFIED 5
  664. #define TABLE_SORT_DONE 6
  665. #define TABLE_RESTRICT_DONE 7
  666. #define TABLE_SETCOL_DONE 8
  667. #define TABLE_RELOAD 9
  668. /* Event Structures */
  669. typedef struct _ERROR_NOTIFICATION
  670. {
  671. ULONG cbEntryID;
  672. LPENTRYID lpEntryID;
  673. SCODE scode;
  674. ULONG ulFlags; /* 0 or MAPI_UNICODE */
  675. LPMAPIERROR lpMAPIError; /* Detailed error information */
  676. } ERROR_NOTIFICATION;
  677. typedef struct _NEWMAIL_NOTIFICATION
  678. {
  679. ULONG cbEntryID;
  680. LPENTRYID lpEntryID; /* identifies the new message */
  681. ULONG cbParentID;
  682. LPENTRYID lpParentID; /* identifies the folder it lives in */
  683. ULONG ulFlags; /* 0 or MAPI_UNICODE */
  684. LPTSTR lpszMessageClass; /* message class (UNICODE or string8) */
  685. ULONG ulMessageFlags; /* copy of PR_MESSAGE_FLAGS */
  686. } NEWMAIL_NOTIFICATION;
  687. typedef struct _OBJECT_NOTIFICATION
  688. {
  689. ULONG cbEntryID;
  690. LPENTRYID lpEntryID; /* EntryID of object */
  691. ULONG ulObjType; /* Type of object */
  692. ULONG cbParentID;
  693. LPENTRYID lpParentID; /* EntryID of parent object */
  694. ULONG cbOldID;
  695. LPENTRYID lpOldID; /* EntryID of old object */
  696. ULONG cbOldParentID;
  697. LPENTRYID lpOldParentID; /* EntryID of old parent */
  698. LPSPropTagArray lpPropTagArray;
  699. } OBJECT_NOTIFICATION;
  700. typedef struct _TABLE_NOTIFICATION
  701. {
  702. ULONG ulTableEvent; /* Identifies WHICH table event */
  703. HRESULT hResult; /* Value for TABLE_ERROR */
  704. SPropValue propIndex; /* This row's "index property" */
  705. SPropValue propPrior; /* Preceding row's "index property" */
  706. SRow row; /* New data of added/modified row */
  707. ULONG ulPad; /* Force to 8-byte boundary */
  708. } TABLE_NOTIFICATION;
  709. typedef struct _EXTENDED_NOTIFICATION
  710. {
  711. ULONG ulEvent; /* extended event code */
  712. ULONG cb; /* size of event parameters */
  713. LPBYTE pbEventParameters; /* event parameters */
  714. } EXTENDED_NOTIFICATION;
  715. typedef struct
  716. {
  717. ULONG cbEntryID;
  718. LPENTRYID lpEntryID;
  719. ULONG cValues;
  720. LPSPropValue lpPropVals;
  721. } STATUS_OBJECT_NOTIFICATION;
  722. typedef struct _NOTIFICATION
  723. {
  724. ULONG ulEventType; /* notification type, i.e. fnevSomething */
  725. ULONG ulAlignPad; /* Force to 8-byte boundary */
  726. union
  727. {
  728. ERROR_NOTIFICATION err;
  729. NEWMAIL_NOTIFICATION newmail;
  730. OBJECT_NOTIFICATION obj;
  731. TABLE_NOTIFICATION tab;
  732. EXTENDED_NOTIFICATION ext;
  733. STATUS_OBJECT_NOTIFICATION statobj;
  734. } info;
  735. } NOTIFICATION, FAR * LPNOTIFICATION;
  736. /* Interface used for registering and issuing notification callbacks. */
  737. #define MAPI_IMAPIADVISESINK_METHODS(IPURE) \
  738. MAPIMETHOD_(ULONG, OnNotify) \
  739. (THIS_ ULONG cNotif, \
  740. LPNOTIFICATION lpNotifications) IPURE; \
  741. #undef INTERFACE
  742. #define INTERFACE IMAPIAdviseSink
  743. DECLARE_MAPI_INTERFACE_(IMAPIAdviseSink, IUnknown)
  744. {
  745. BEGIN_INTERFACE
  746. MAPI_IUNKNOWN_METHODS(PURE)
  747. MAPI_IMAPIADVISESINK_METHODS(PURE)
  748. };
  749. /* Callback function type for MAPIAllocAdviseSink */
  750. typedef long (STDAPICALLTYPE NOTIFCALLBACK) (
  751. LPVOID lpvContext,
  752. ULONG cNotification,
  753. LPNOTIFICATION lpNotifications);
  754. typedef NOTIFCALLBACK FAR * LPNOTIFCALLBACK;
  755. /*
  756. * Message name for the 16-bit MAPI notififcation engine.
  757. * This can be used in 16-bit applications to force processing
  758. * of notification callbacks.
  759. */
  760. #define szMAPINotificationMsg "MAPI Notify window message"
  761. /* IMAPIProgress Interface ------------------------------------------------- */
  762. /* Flag values for the progress indicator */
  763. #define MAPI_TOP_LEVEL ((ULONG) 0x00000001)
  764. #define MAPI_IMAPIPROGRESS_METHODS(IPURE) \
  765. MAPIMETHOD(Progress) \
  766. (THIS_ ULONG ulValue, \
  767. ULONG ulCount, \
  768. ULONG ulTotal) IPURE; \
  769. MAPIMETHOD(GetFlags) \
  770. (THIS_ ULONG FAR * lpulFlags) IPURE; \
  771. MAPIMETHOD(GetMax) \
  772. (THIS_ ULONG FAR * lpulMax) IPURE; \
  773. MAPIMETHOD(GetMin) \
  774. (THIS_ ULONG FAR * lpulMin) IPURE; \
  775. MAPIMETHOD(SetLimits) \
  776. (THIS_ LPULONG lpulMin, \
  777. LPULONG lpulMax, \
  778. LPULONG lpulFlags) IPURE; \
  779. #undef INTERFACE
  780. #define INTERFACE IMAPIProgress
  781. DECLARE_MAPI_INTERFACE_(IMAPIProgress, IUnknown)
  782. {
  783. BEGIN_INTERFACE
  784. MAPI_IUNKNOWN_METHODS(PURE)
  785. MAPI_IMAPIPROGRESS_METHODS(PURE)
  786. };
  787. /* IMAPIProp Interface ----------------------------------------------------- */
  788. /* GetLastError */
  789. /****** MAPI_UNICODE ((ULONG) 0x80000000) above */
  790. /*
  791. * Version:
  792. */
  793. #define MAPI_ERROR_VERSION 0x00000000L
  794. /* GetPropList */
  795. /****** MAPI_UNICODE ((ULONG) 0x80000000) above */
  796. /* GetProps */
  797. /****** MAPI_UNICODE ((ULONG) 0x80000000) above */
  798. /* SaveChanges */
  799. #define KEEP_OPEN_READONLY ((ULONG) 0x00000001)
  800. #define KEEP_OPEN_READWRITE ((ULONG) 0x00000002)
  801. #define FORCE_SAVE ((ULONG) 0x00000004)
  802. /* define MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */
  803. /* OpenProperty - ulFlags */
  804. /****** MAPI_MODIFY ((ULONG) 0x00000001) above */
  805. #define MAPI_CREATE ((ULONG) 0x00000002)
  806. #define STREAM_APPEND ((ULONG) 0x00000004)
  807. /****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */
  808. /* OpenProperty - ulInterfaceOptions, IID_IMAPITable */
  809. /****** MAPI_UNICODE ((ULONG) 0x80000000) above */
  810. /* CopyTo, CopyProps */
  811. #define MAPI_MOVE ((ULONG) 0x00000001)
  812. #define MAPI_NOREPLACE ((ULONG) 0x00000002)
  813. #define MAPI_DECLINE_OK ((ULONG) 0x00000004)
  814. #ifndef MAPI_DIALOG /* also defined in mapi.h */
  815. #define MAPI_DIALOG ((ULONG) 0x00000008)
  816. #endif
  817. #ifndef MAPI_USE_DEFAULT /* also defined in mapi.h */
  818. #define MAPI_USE_DEFAULT 0x00000040 /* Use default profile in logon */
  819. #endif
  820. /* Flags used in GetIDsFromNames */
  821. /****** MAPI_CREATE ((ULONG) 0x00000002) above */
  822. /* Flags used in GetNamesFromIDs (bit fields) */
  823. #define MAPI_NO_STRINGS ((ULONG) 0x00000001)
  824. #define MAPI_NO_IDS ((ULONG) 0x00000002)
  825. /* Union discriminator */
  826. #define MNID_ID 0
  827. #define MNID_STRING 1
  828. typedef struct _MAPINAMEID
  829. {
  830. LPGUID lpguid;
  831. ULONG ulKind;
  832. union {
  833. LONG lID;
  834. LPWSTR lpwstrName;
  835. } Kind;
  836. } MAPINAMEID, FAR * LPMAPINAMEID;
  837. #define MAPI_IMAPIPROP_METHODS(IPURE) \
  838. MAPIMETHOD(GetLastError) \
  839. (THIS_ HRESULT hResult, \
  840. ULONG ulFlags, \
  841. LPMAPIERROR FAR * lppMAPIError) IPURE; \
  842. MAPIMETHOD(SaveChanges) \
  843. (THIS_ ULONG ulFlags) IPURE; \
  844. MAPIMETHOD(GetProps) \
  845. (THIS_ LPSPropTagArray lpPropTagArray, \
  846. ULONG ulFlags, \
  847. ULONG FAR * lpcValues, \
  848. LPSPropValue FAR * lppPropArray) IPURE; \
  849. MAPIMETHOD(GetPropList) \
  850. (THIS_ ULONG ulFlags, \
  851. LPSPropTagArray FAR * lppPropTagArray) IPURE; \
  852. MAPIMETHOD(OpenProperty) \
  853. (THIS_ ULONG ulPropTag, \
  854. LPCIID lpiid, \
  855. ULONG ulInterfaceOptions, \
  856. ULONG ulFlags, \
  857. LPUNKNOWN FAR * lppUnk) IPURE; \
  858. MAPIMETHOD(SetProps) \
  859. (THIS_ ULONG cValues, \
  860. LPSPropValue lpPropArray, \
  861. LPSPropProblemArray FAR * lppProblems) IPURE; \
  862. MAPIMETHOD(DeleteProps) \
  863. (THIS_ LPSPropTagArray lpPropTagArray, \
  864. LPSPropProblemArray FAR * lppProblems) IPURE; \
  865. MAPIMETHOD(CopyTo) \
  866. (THIS_ ULONG ciidExclude, \
  867. LPCIID rgiidExclude, \
  868. LPSPropTagArray lpExcludeProps, \
  869. ULONG ulUIParam, \
  870. LPMAPIPROGRESS lpProgress, \
  871. LPCIID lpInterface, \
  872. LPVOID lpDestObj, \
  873. ULONG ulFlags, \
  874. LPSPropProblemArray FAR * lppProblems) IPURE; \
  875. MAPIMETHOD(CopyProps) \
  876. (THIS_ LPSPropTagArray lpIncludeProps, \
  877. ULONG ulUIParam, \
  878. LPMAPIPROGRESS lpProgress, \
  879. LPCIID lpInterface, \
  880. LPVOID lpDestObj, \
  881. ULONG ulFlags, \
  882. LPSPropProblemArray FAR * lppProblems) IPURE; \
  883. MAPIMETHOD(GetNamesFromIDs) \
  884. (THIS_ LPSPropTagArray FAR * lppPropTags, \
  885. LPGUID lpPropSetGuid, \
  886. ULONG ulFlags, \
  887. ULONG FAR * lpcPropNames, \
  888. LPMAPINAMEID FAR * FAR * lpppPropNames) IPURE; \
  889. MAPIMETHOD(GetIDsFromNames) \
  890. (THIS_ ULONG cPropNames, \
  891. LPMAPINAMEID FAR * lppPropNames, \
  892. ULONG ulFlags, \
  893. LPSPropTagArray FAR * lppPropTags) IPURE; \
  894. #undef INTERFACE
  895. #define INTERFACE IMAPIProp
  896. DECLARE_MAPI_INTERFACE_(IMAPIProp, IUnknown)
  897. {
  898. BEGIN_INTERFACE
  899. MAPI_IUNKNOWN_METHODS(PURE)
  900. MAPI_IMAPIPROP_METHODS(PURE)
  901. };
  902. /* IMAPITable Interface ---------------------------------------------------- */
  903. /* Table status */
  904. #define TBLSTAT_COMPLETE ((ULONG) 0)
  905. #define TBLSTAT_QCHANGED ((ULONG) 7)
  906. #define TBLSTAT_SORTING ((ULONG) 9)
  907. #define TBLSTAT_SORT_ERROR ((ULONG) 10)
  908. #define TBLSTAT_SETTING_COLS ((ULONG) 11)
  909. #define TBLSTAT_SETCOL_ERROR ((ULONG) 13)
  910. #define TBLSTAT_RESTRICTING ((ULONG) 14)
  911. #define TBLSTAT_RESTRICT_ERROR ((ULONG) 15)
  912. /* Table Type */
  913. #define TBLTYPE_SNAPSHOT ((ULONG) 0)
  914. #define TBLTYPE_KEYSET ((ULONG) 1)
  915. #define TBLTYPE_DYNAMIC ((ULONG) 2)
  916. /* Sort order */
  917. /* bit 0: set if descending, clear if ascending */
  918. #define TABLE_SORT_ASCEND ((ULONG) 0x00000000)
  919. #define TABLE_SORT_DESCEND ((ULONG) 0x00000001)
  920. #define TABLE_SORT_COMBINE ((ULONG) 0x00000002)
  921. /* Data structures */
  922. typedef struct _SSortOrder
  923. {
  924. ULONG ulPropTag; /* Column to sort on */
  925. ULONG ulOrder; /* Ascending, descending, combine to left */
  926. } SSortOrder, FAR * LPSSortOrder;
  927. typedef struct _SSortOrderSet
  928. {
  929. ULONG cSorts; /* Number of sort columns in aSort below*/
  930. ULONG cCategories; /* 0 for non-categorized, up to cSorts */
  931. ULONG cExpanded; /* 0 if no categories start expanded, */
  932. /* up to cExpanded */
  933. SSortOrder aSort[MAPI_DIM]; /* The sort orders */
  934. } SSortOrderSet, FAR * LPSSortOrderSet;
  935. #define CbNewSSortOrderSet(_csort) \
  936. (offsetof(SSortOrderSet,aSort) + (_csort)*sizeof(SSortOrder))
  937. #define CbSSortOrderSet(_lpset) \
  938. (offsetof(SSortOrderSet,aSort) + \
  939. (UINT)((_lpset)->cSorts*sizeof(SSortOrder)))
  940. #define SizedSSortOrderSet(_csort, _name) \
  941. struct _SSortOrderSet_ ## _name \
  942. { \
  943. ULONG cSorts; \
  944. ULONG cCategories; \
  945. ULONG cExpanded; \
  946. SSortOrder aSort[_csort]; \
  947. } _name
  948. typedef ULONG BOOKMARK;
  949. #define BOOKMARK_BEGINNING ((BOOKMARK) 0) /* Before first row */
  950. #define BOOKMARK_CURRENT ((BOOKMARK) 1) /* Before current row */
  951. #define BOOKMARK_END ((BOOKMARK) 2) /* After last row */
  952. /* Fuzzy Level */
  953. #define FL_FULLSTRING ((ULONG) 0x00000000)
  954. #define FL_SUBSTRING ((ULONG) 0x00000001)
  955. #define FL_PREFIX ((ULONG) 0x00000002)
  956. #define FL_IGNORECASE ((ULONG) 0x00010000)
  957. #define FL_IGNORENONSPACE ((ULONG) 0x00020000)
  958. #define FL_LOOSE ((ULONG) 0x00040000)
  959. /* Restrictions */
  960. typedef struct _SRestriction FAR * LPSRestriction;
  961. /* Restriction types */
  962. #define RES_AND ((ULONG) 0x00000000)
  963. #define RES_OR ((ULONG) 0x00000001)
  964. #define RES_NOT ((ULONG) 0x00000002)
  965. #define RES_CONTENT ((ULONG) 0x00000003)
  966. #define RES_PROPERTY ((ULONG) 0x00000004)
  967. #define RES_COMPAREPROPS ((ULONG) 0x00000005)
  968. #define RES_BITMASK ((ULONG) 0x00000006)
  969. #define RES_SIZE ((ULONG) 0x00000007)
  970. #define RES_EXIST ((ULONG) 0x00000008)
  971. #define RES_SUBRESTRICTION ((ULONG) 0x00000009)
  972. #define RES_COMMENT ((ULONG) 0x0000000A)
  973. /* Relational operators. These apply to all property comparison restrictions. */
  974. #define RELOP_LT ((ULONG) 0) /* < */
  975. #define RELOP_LE ((ULONG) 1) /* <= */
  976. #define RELOP_GT ((ULONG) 2) /* > */
  977. #define RELOP_GE ((ULONG) 3) /* >= */
  978. #define RELOP_EQ ((ULONG) 4) /* == */
  979. #define RELOP_NE ((ULONG) 5) /* != */
  980. #define RELOP_RE ((ULONG) 6) /* LIKE (Regular expression) */
  981. /* Bitmask operators, for RES_BITMASK only. */
  982. #define BMR_EQZ ((ULONG) 0) /* ==0 */
  983. #define BMR_NEZ ((ULONG) 1) /* !=0 */
  984. /* Subobject identifiers for RES_SUBRESTRICTION only. See MAPITAGS.H. */
  985. /* #define PR_MESSAGE_RECIPIENTS PROP_TAG(PT_OBJECT,0x0E12) */
  986. /* #define PR_MESSAGE_ATTACHMENTS PROP_TAG(PT_OBJECT,0x0E13) */
  987. typedef struct _SAndRestriction
  988. {
  989. ULONG cRes;
  990. LPSRestriction lpRes;
  991. } SAndRestriction;
  992. typedef struct _SOrRestriction
  993. {
  994. ULONG cRes;
  995. LPSRestriction lpRes;
  996. } SOrRestriction;
  997. typedef struct _SNotRestriction
  998. {
  999. ULONG ulReserved;
  1000. LPSRestriction lpRes;
  1001. } SNotRestriction;
  1002. typedef struct _SContentRestriction
  1003. {
  1004. ULONG ulFuzzyLevel;
  1005. ULONG ulPropTag;
  1006. LPSPropValue lpProp;
  1007. } SContentRestriction;
  1008. typedef struct _SBitMaskRestriction
  1009. {
  1010. ULONG relBMR;
  1011. ULONG ulPropTag;
  1012. ULONG ulMask;
  1013. } SBitMaskRestriction;
  1014. typedef struct _SPropertyRestriction
  1015. {
  1016. ULONG relop;
  1017. ULONG ulPropTag;
  1018. LPSPropValue lpProp;
  1019. } SPropertyRestriction;
  1020. typedef struct _SComparePropsRestriction
  1021. {
  1022. ULONG relop;
  1023. ULONG ulPropTag1;
  1024. ULONG ulPropTag2;
  1025. } SComparePropsRestriction;
  1026. typedef struct _SSizeRestriction
  1027. {
  1028. ULONG relop;
  1029. ULONG ulPropTag;
  1030. ULONG cb;
  1031. } SSizeRestriction;
  1032. typedef struct _SExistRestriction
  1033. {
  1034. ULONG ulReserved1;
  1035. ULONG ulPropTag;
  1036. ULONG ulReserved2;
  1037. } SExistRestriction;
  1038. typedef struct _SSubRestriction
  1039. {
  1040. ULONG ulSubObject;
  1041. LPSRestriction lpRes;
  1042. } SSubRestriction;
  1043. typedef struct _SCommentRestriction
  1044. {
  1045. ULONG cValues; /* # of properties in lpProp */
  1046. LPSRestriction lpRes;
  1047. LPSPropValue lpProp;
  1048. } SCommentRestriction;
  1049. typedef struct _SRestriction
  1050. {
  1051. ULONG rt; /* Restriction type */
  1052. union
  1053. {
  1054. SComparePropsRestriction resCompareProps; /* first */
  1055. SAndRestriction resAnd;
  1056. SOrRestriction resOr;
  1057. SNotRestriction resNot;
  1058. SContentRestriction resContent;
  1059. SPropertyRestriction resProperty;
  1060. SBitMaskRestriction resBitMask;
  1061. SSizeRestriction resSize;
  1062. SExistRestriction resExist;
  1063. SSubRestriction resSub;
  1064. SCommentRestriction resComment;
  1065. } res;
  1066. } SRestriction;
  1067. /* SComparePropsRestriction is first in the union so that */
  1068. /* static initializations of 3-value restriction work. */
  1069. /* Flags of the methods of IMAPITable */
  1070. /* QueryColumn */
  1071. #define TBL_ALL_COLUMNS ((ULONG) 0x00000001)
  1072. /* QueryRows */
  1073. /* Possible values for PR_ROW_TYPE (for categorization) */
  1074. #define TBL_LEAF_ROW ((ULONG) 1)
  1075. #define TBL_EMPTY_CATEGORY ((ULONG) 2)
  1076. #define TBL_EXPANDED_CATEGORY ((ULONG) 3)
  1077. #define TBL_COLLAPSED_CATEGORY ((ULONG) 4)
  1078. /* Table wait flag */
  1079. #define TBL_NOWAIT ((ULONG) 0x00000001)
  1080. /* alternative name for TBL_NOWAIT */
  1081. #define TBL_ASYNC ((ULONG) 0x00000001)
  1082. #define TBL_BATCH ((ULONG) 0x00000002)
  1083. /* FindRow */
  1084. #define DIR_BACKWARD ((ULONG) 0x00000001)
  1085. /* Table cursor states */
  1086. #define TBL_NOADVANCE ((ULONG) 0x00000001)
  1087. #define MAPI_IMAPITABLE_METHODS(IPURE) \
  1088. MAPIMETHOD(GetLastError) \
  1089. (THIS_ HRESULT hResult, \
  1090. ULONG ulFlags, \
  1091. LPMAPIERROR FAR * lppMAPIError) IPURE; \
  1092. MAPIMETHOD(Advise) \
  1093. (THIS_ ULONG ulEventMask, \
  1094. LPMAPIADVISESINK lpAdviseSink, \
  1095. ULONG FAR * lpulConnection) IPURE; \
  1096. MAPIMETHOD(Unadvise) \
  1097. (THIS_ ULONG ulConnection) IPURE; \
  1098. MAPIMETHOD(GetStatus) \
  1099. (THIS_ ULONG FAR * lpulTableStatus, \
  1100. ULONG FAR * lpulTableType) IPURE; \
  1101. MAPIMETHOD(SetColumns) \
  1102. (THIS_ LPSPropTagArray lpPropTagArray, \
  1103. ULONG ulFlags) IPURE; \
  1104. MAPIMETHOD(QueryColumns) \
  1105. (THIS_ ULONG ulFlags, \
  1106. LPSPropTagArray FAR * lpPropTagArray) IPURE; \
  1107. MAPIMETHOD(GetRowCount) \
  1108. (THIS_ ULONG ulFlags, \
  1109. ULONG FAR * lpulCount) IPURE; \
  1110. MAPIMETHOD(SeekRow) \
  1111. (THIS_ BOOKMARK bkOrigin, \
  1112. LONG lRowCount, \
  1113. LONG FAR * lplRowsSought) IPURE; \
  1114. MAPIMETHOD(SeekRowApprox) \
  1115. (THIS_ ULONG ulNumerator, \
  1116. ULONG ulDenominator) IPURE; \
  1117. MAPIMETHOD(QueryPosition) \
  1118. (THIS_ ULONG FAR * lpulRow, \
  1119. ULONG FAR * lpulNumerator, \
  1120. ULONG FAR * lpulDenominator) IPURE; \
  1121. MAPIMETHOD(FindRow) \
  1122. (THIS_ LPSRestriction lpRestriction, \
  1123. BOOKMARK bkOrigin, \
  1124. ULONG ulFlags) IPURE; \
  1125. MAPIMETHOD(Restrict) \
  1126. (THIS_ LPSRestriction lpRestriction, \
  1127. ULONG ulFlags) IPURE; \
  1128. MAPIMETHOD(CreateBookmark) \
  1129. (THIS_ BOOKMARK FAR * lpbkPosition) IPURE; \
  1130. MAPIMETHOD(FreeBookmark) \
  1131. (THIS_ BOOKMARK bkPosition) IPURE; \
  1132. MAPIMETHOD(SortTable) \
  1133. (THIS_ LPSSortOrderSet lpSortCriteria, \
  1134. ULONG ulFlags) IPURE; \
  1135. MAPIMETHOD(QuerySortOrder) \
  1136. (THIS_ LPSSortOrderSet FAR * lppSortCriteria) IPURE; \
  1137. MAPIMETHOD(QueryRows) \
  1138. (THIS_ LONG lRowCount, \
  1139. ULONG ulFlags, \
  1140. LPSRowSet FAR * lppRows) IPURE; \
  1141. MAPIMETHOD(Abort) (THIS) IPURE; \
  1142. MAPIMETHOD(ExpandRow) \
  1143. (THIS_ ULONG cbInstanceKey, \
  1144. LPBYTE pbInstanceKey, \
  1145. ULONG ulRowCount, \
  1146. ULONG ulFlags, \
  1147. LPSRowSet FAR * lppRows, \
  1148. ULONG FAR * lpulMoreRows) IPURE; \
  1149. MAPIMETHOD(CollapseRow) \
  1150. (THIS_ ULONG cbInstanceKey, \
  1151. LPBYTE pbInstanceKey, \
  1152. ULONG ulFlags, \
  1153. ULONG FAR * lpulRowCount) IPURE; \
  1154. MAPIMETHOD(WaitForCompletion) \
  1155. (THIS_ ULONG ulFlags, \
  1156. ULONG ulTimeout, \
  1157. ULONG FAR * lpulTableStatus) IPURE; \
  1158. MAPIMETHOD(GetCollapseState) \
  1159. (THIS_ ULONG ulFlags, \
  1160. ULONG cbInstanceKey, \
  1161. LPBYTE lpbInstanceKey, \
  1162. ULONG FAR * lpcbCollapseState, \
  1163. LPBYTE FAR * lppbCollapseState) IPURE; \
  1164. MAPIMETHOD(SetCollapseState) \
  1165. (THIS_ ULONG ulFlags, \
  1166. ULONG cbCollapseState, \
  1167. LPBYTE pbCollapseState, \
  1168. BOOKMARK FAR * lpbkLocation) IPURE; \
  1169. #undef INTERFACE
  1170. #define INTERFACE IMAPITable
  1171. DECLARE_MAPI_INTERFACE_(IMAPITable, IUnknown)
  1172. {
  1173. BEGIN_INTERFACE
  1174. MAPI_IUNKNOWN_METHODS(PURE)
  1175. MAPI_IMAPITABLE_METHODS(PURE)
  1176. };
  1177. /* IProfSect Interface ----------------------------------------------------- */
  1178. /* Standard section for public profile properties */
  1179. #define PS_PROFILE_PROPERTIES_INIT \
  1180. { 0x98, 0x15, 0xAC, 0x08, 0xAA, 0xB0, 0x10, 0x1A, \
  1181. 0x8C, 0x93, 0x08, 0x00, 0x2B, 0x2A, 0x56, 0xC2 }
  1182. #define MAPI_IPROFSECT_METHODS(IPURE)
  1183. #undef INTERFACE
  1184. #define INTERFACE IProfSect
  1185. DECLARE_MAPI_INTERFACE_(IProfSect, IMAPIProp)
  1186. {
  1187. BEGIN_INTERFACE
  1188. MAPI_IUNKNOWN_METHODS(PURE)
  1189. MAPI_IMAPIPROP_METHODS(PURE)
  1190. MAPI_IPROFSECT_METHODS(PURE)
  1191. };
  1192. /* IMAPIStatus Interface --------------------------------------------------- */
  1193. /* Values for PR_RESOURCE_TYPE, _METHODS, _FLAGS */
  1194. #define MAPI_STORE_PROVIDER ((ULONG) 33) /* Message Store */
  1195. #define MAPI_AB ((ULONG) 34) /* Address Book */
  1196. #define MAPI_AB_PROVIDER ((ULONG) 35) /* Address Book Provider */
  1197. #define MAPI_TRANSPORT_PROVIDER ((ULONG) 36) /* Transport Provider */
  1198. #define MAPI_SPOOLER ((ULONG) 37) /* Message Spooler */
  1199. #define MAPI_PROFILE_PROVIDER ((ULONG) 38) /* Profile Provider */
  1200. #define MAPI_SUBSYSTEM ((ULONG) 39) /* Overall Subsystem Status */
  1201. #define MAPI_HOOK_PROVIDER ((ULONG) 40) /* Spooler Hook */
  1202. #define STATUS_VALIDATE_STATE ((ULONG) 0x00000001)
  1203. #define STATUS_SETTINGS_DIALOG ((ULONG) 0x00000002)
  1204. #define STATUS_CHANGE_PASSWORD ((ULONG) 0x00000004)
  1205. #define STATUS_FLUSH_QUEUES ((ULONG) 0x00000008)
  1206. #define STATUS_DEFAULT_OUTBOUND ((ULONG) 0x00000001)
  1207. #define STATUS_DEFAULT_STORE ((ULONG) 0x00000002)
  1208. #define STATUS_PRIMARY_IDENTITY ((ULONG) 0x00000004)
  1209. #define STATUS_SIMPLE_STORE ((ULONG) 0x00000008)
  1210. #define STATUS_XP_PREFER_LAST ((ULONG) 0x00000010)
  1211. #define STATUS_NO_PRIMARY_IDENTITY ((ULONG) 0x00000020)
  1212. #define STATUS_NO_DEFAULT_STORE ((ULONG) 0x00000040)
  1213. #define STATUS_TEMP_SECTION ((ULONG) 0x00000080)
  1214. #define STATUS_OWN_STORE ((ULONG) 0x00000100)
  1215. /****** HOOK_INBOUND ((ULONG) 0x00000200) Defined in MAPIHOOK.H */
  1216. /****** HOOK_OUTBOUND ((ULONG) 0x00000400) Defined in MAPIHOOK.H */
  1217. #define STATUS_NEED_IPM_TREE ((ULONG) 0x00000800)
  1218. #define STATUS_PRIMARY_STORE ((ULONG) 0x00001000)
  1219. #define STATUS_SECONDARY_STORE ((ULONG) 0x00002000)
  1220. /*
  1221. * PR_STATUS_CODE bit. Low 16 bits for common values; High 16 bits
  1222. * for provider type-specific values. (DCR 304)
  1223. */
  1224. #define STATUS_AVAILABLE ((ULONG) 0x00000001)
  1225. #define STATUS_OFFLINE ((ULONG) 0x00000002)
  1226. #define STATUS_FAILURE ((ULONG) 0x00000004)
  1227. /* Transport values of PR_STATUS_CODE */
  1228. #define STATUS_INBOUND_ENABLED ((ULONG) 0x00010000)
  1229. #define STATUS_INBOUND_ACTIVE ((ULONG) 0x00020000)
  1230. #define STATUS_INBOUND_FLUSH ((ULONG) 0x00040000)
  1231. #define STATUS_OUTBOUND_ENABLED ((ULONG) 0x00100000)
  1232. #define STATUS_OUTBOUND_ACTIVE ((ULONG) 0x00200000)
  1233. #define STATUS_OUTBOUND_FLUSH ((ULONG) 0x00400000)
  1234. #define STATUS_REMOTE_ACCESS ((ULONG) 0x00800000)
  1235. /* ValidateState flags */
  1236. #define SUPPRESS_UI ((ULONG) 0x00000001)
  1237. #define REFRESH_XP_HEADER_CACHE ((ULONG) 0x00010000)
  1238. #define PROCESS_XP_HEADER_CACHE ((ULONG) 0x00020000)
  1239. #define FORCE_XP_CONNECT ((ULONG) 0x00040000)
  1240. #define FORCE_XP_DISCONNECT ((ULONG) 0x00080000)
  1241. #define CONFIG_CHANGED ((ULONG) 0x00100000)
  1242. #define ABORT_XP_HEADER_OPERATION ((ULONG) 0x00200000)
  1243. #define SHOW_XP_SESSION_UI ((ULONG) 0x00400000)
  1244. /* SettingsDialog flags */
  1245. #define UI_READONLY ((ULONG) 0x00000001)
  1246. /* FlushQueues flags */
  1247. #define FLUSH_UPLOAD ((ULONG) 0x00000002)
  1248. #define FLUSH_DOWNLOAD ((ULONG) 0x00000004)
  1249. #define FLUSH_FORCE ((ULONG) 0x00000008)
  1250. #define FLUSH_NO_UI ((ULONG) 0x00000010)
  1251. #define FLUSH_ASYNC_OK ((ULONG) 0x00000020)
  1252. #define MAPI_IMAPISTATUS_METHODS(IPURE) \
  1253. MAPIMETHOD(ValidateState) \
  1254. (THIS_ ULONG ulUIParam, \
  1255. ULONG ulFlags) IPURE; \
  1256. MAPIMETHOD(SettingsDialog) \
  1257. (THIS_ ULONG ulUIParam, \
  1258. ULONG ulFlags) IPURE; \
  1259. MAPIMETHOD(ChangePassword) \
  1260. (THIS_ LPTSTR lpOldPass, \
  1261. LPTSTR lpNewPass, \
  1262. ULONG ulFlags) IPURE; \
  1263. MAPIMETHOD(FlushQueues) \
  1264. (THIS_ ULONG ulUIParam, \
  1265. ULONG cbTargetTransport, \
  1266. LPENTRYID lpTargetTransport, \
  1267. ULONG ulFlags) IPURE; \
  1268. #undef INTERFACE
  1269. #define INTERFACE IMAPIStatus
  1270. DECLARE_MAPI_INTERFACE_(IMAPIStatus, IMAPIProp)
  1271. {
  1272. BEGIN_INTERFACE
  1273. MAPI_IUNKNOWN_METHODS(PURE)
  1274. MAPI_IMAPIPROP_METHODS(PURE)
  1275. MAPI_IMAPISTATUS_METHODS(PURE)
  1276. };
  1277. /* IMAPIContainer Interface ------------------------------------------------ */
  1278. /* Flags for OpenEntry() */
  1279. /****** MAPI_MODIFY ((ULONG) 0x00000001) above */
  1280. /****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */
  1281. #define MAPI_BEST_ACCESS ((ULONG) 0x00000010)
  1282. /* GetContentsTable() */
  1283. /****** MAPI_UNICODE ((ULONG) 0x80000000) above */
  1284. /****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */
  1285. /****** MAPI_ASSOCIATED ((ULONG) 0x00000040) below */
  1286. /* GetHierarchyTable() */
  1287. /****** MAPI_UNICODE ((ULONG) 0x80000000) above */
  1288. #define CONVENIENT_DEPTH ((ULONG) 0x00000001)
  1289. /****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */
  1290. /* GetSearchCriteria */
  1291. /****** MAPI_UNICODE ((ULONG) 0x80000000) above */
  1292. #define SEARCH_RUNNING ((ULONG) 0x00000001)
  1293. #define SEARCH_REBUILD ((ULONG) 0x00000002)
  1294. #define SEARCH_RECURSIVE ((ULONG) 0x00000004)
  1295. #define SEARCH_FOREGROUND ((ULONG) 0x00000008)
  1296. /* SetSearchCriteria */
  1297. #define STOP_SEARCH ((ULONG) 0x00000001)
  1298. #define RESTART_SEARCH ((ULONG) 0x00000002)
  1299. #define RECURSIVE_SEARCH ((ULONG) 0x00000004)
  1300. #define SHALLOW_SEARCH ((ULONG) 0x00000008)
  1301. #define FOREGROUND_SEARCH ((ULONG) 0x00000010)
  1302. #define BACKGROUND_SEARCH ((ULONG) 0x00000020)
  1303. #define MAPI_IMAPICONTAINER_METHODS(IPURE) \
  1304. MAPIMETHOD(GetContentsTable) \
  1305. (THIS_ ULONG ulFlags, \
  1306. LPMAPITABLE FAR * lppTable) IPURE; \
  1307. MAPIMETHOD(GetHierarchyTable) \
  1308. (THIS_ ULONG ulFlags, \
  1309. LPMAPITABLE FAR * lppTable) IPURE; \
  1310. MAPIMETHOD(OpenEntry) \
  1311. (THIS_ ULONG cbEntryID, \
  1312. LPENTRYID lpEntryID, \
  1313. LPCIID lpInterface, \
  1314. ULONG ulFlags, \
  1315. ULONG FAR * lpulObjType, \
  1316. LPUNKNOWN FAR * lppUnk) IPURE; \
  1317. MAPIMETHOD(SetSearchCriteria) \
  1318. (THIS_ LPSRestriction lpRestriction, \
  1319. LPENTRYLIST lpContainerList, \
  1320. ULONG ulSearchFlags) IPURE; \
  1321. MAPIMETHOD(GetSearchCriteria) \
  1322. (THIS_ ULONG ulFlags, \
  1323. LPSRestriction FAR * lppRestriction, \
  1324. LPENTRYLIST FAR * lppContainerList, \
  1325. ULONG FAR * lpulSearchState)IPURE; \
  1326. #undef INTERFACE
  1327. #define INTERFACE IMAPIContainer
  1328. DECLARE_MAPI_INTERFACE_(IMAPIContainer, IMAPIProp)
  1329. {
  1330. BEGIN_INTERFACE
  1331. MAPI_IUNKNOWN_METHODS(PURE)
  1332. MAPI_IMAPIPROP_METHODS(PURE)
  1333. MAPI_IMAPICONTAINER_METHODS(PURE)
  1334. };
  1335. /* IABContainer Interface -------------------------------------------------- */
  1336. /*
  1337. * IABContainer PR_CONTAINER_FLAGS values
  1338. * If AB_UNMODIFIABLE and AB_MODIFIABLE are both set, it means the container
  1339. * doesn't know if it's modifiable or not, and the client should
  1340. * try to modify the contents but we won't expect it to work.
  1341. * If the AB_RECIPIENTS flag is set and neither AB_MODIFIABLE or AB_UNMODIFIABLE
  1342. * bits are set, it is an error.
  1343. */
  1344. typedef struct _flaglist
  1345. {
  1346. ULONG cFlags;
  1347. ULONG ulFlag[MAPI_DIM];
  1348. } FlagList, FAR * LPFlagList;
  1349. /*
  1350. * Container flags
  1351. */
  1352. #define AB_RECIPIENTS ((ULONG) 0x00000001)
  1353. #define AB_SUBCONTAINERS ((ULONG) 0x00000002)
  1354. #define AB_MODIFIABLE ((ULONG) 0x00000004)
  1355. #define AB_UNMODIFIABLE ((ULONG) 0x00000008)
  1356. #define AB_FIND_ON_OPEN ((ULONG) 0x00000010)
  1357. #define AB_NOT_DEFAULT ((ULONG) 0x00000020)
  1358. /* CreateEntry() */
  1359. #define CREATE_CHECK_DUP_STRICT ((ULONG) 0x00000001)
  1360. #define CREATE_CHECK_DUP_LOOSE ((ULONG) 0x00000002)
  1361. #define CREATE_REPLACE ((ULONG) 0x00000004)
  1362. /* ResolveNames() - ulFlags */
  1363. /****** MAPI_UNICODE ((ULONG) 0x80000000) above */
  1364. /* ResolveNames() - rgulFlags */
  1365. #define MAPI_UNRESOLVED ((ULONG) 0x00000000)
  1366. #define MAPI_AMBIGUOUS ((ULONG) 0x00000001)
  1367. #define MAPI_RESOLVED ((ULONG) 0x00000002)
  1368. #define MAPI_IABCONTAINER_METHODS(IPURE) \
  1369. MAPIMETHOD(CreateEntry) \
  1370. (THIS_ ULONG cbEntryID, \
  1371. LPENTRYID lpEntryID, \
  1372. ULONG ulCreateFlags, \
  1373. LPMAPIPROP FAR * lppMAPIPropEntry) IPURE; \
  1374. MAPIMETHOD(CopyEntries) \
  1375. (THIS_ LPENTRYLIST lpEntries, \
  1376. ULONG ulUIParam, \
  1377. LPMAPIPROGRESS lpProgress, \
  1378. ULONG ulFlags) IPURE; \
  1379. MAPIMETHOD(DeleteEntries) \
  1380. (THIS_ LPENTRYLIST lpEntries, \
  1381. ULONG ulFlags) IPURE; \
  1382. MAPIMETHOD(ResolveNames) \
  1383. (THIS_ LPSPropTagArray lpPropTagArray, \
  1384. ULONG ulFlags, \
  1385. LPADRLIST lpAdrList, \
  1386. LPFlagList lpFlagList) IPURE; \
  1387. #undef INTERFACE
  1388. #define INTERFACE IABContainer
  1389. DECLARE_MAPI_INTERFACE_(IABContainer, IMAPIContainer)
  1390. {
  1391. BEGIN_INTERFACE
  1392. MAPI_IUNKNOWN_METHODS(PURE)
  1393. MAPI_IMAPIPROP_METHODS(PURE)
  1394. MAPI_IMAPICONTAINER_METHODS(PURE)
  1395. MAPI_IABCONTAINER_METHODS(PURE)
  1396. };
  1397. /* IMailUser Interface ----------------------------------------------------- */
  1398. /* Any call which can create a one-off entryID (i.e. MAPISupport::CreateOneOff
  1399. or IAdrBook::CreateOneOff) can encode the value for PR_SEND_RICH_INFO by
  1400. passing in the following flag in the ulFlags parameter. Setting this flag
  1401. indicates that PR_SEND_RICH_INFO will be FALSE.
  1402. */
  1403. #define MAPI_SEND_NO_RICH_INFO ((ULONG) 0x00010000)
  1404. /* Values of PR_NDR_DIAG_CODE */
  1405. #define MAPI_DIAG(_code) ((LONG) _code)
  1406. #define MAPI_DIAG_NO_DIAGNOSTIC MAPI_DIAG( -1 )
  1407. #define MAPI_DIAG_OR_NAME_UNRECOGNIZED MAPI_DIAG( 0 )
  1408. #define MAPI_DIAG_OR_NAME_AMBIGUOUS MAPI_DIAG( 1 )
  1409. #define MAPI_DIAG_MTS_CONGESTED MAPI_DIAG( 2 )
  1410. #define MAPI_DIAG_LOOP_DETECTED MAPI_DIAG( 3 )
  1411. #define MAPI_DIAG_RECIPIENT_UNAVAILABLE MAPI_DIAG( 4 )
  1412. #define MAPI_DIAG_MAXIMUM_TIME_EXPIRED MAPI_DIAG( 5 )
  1413. #define MAPI_DIAG_EITS_UNSUPPORTED MAPI_DIAG( 6 )
  1414. #define MAPI_DIAG_CONTENT_TOO_LONG MAPI_DIAG( 7 )
  1415. #define MAPI_DIAG_IMPRACTICAL_TO_CONVERT MAPI_DIAG( 8 )
  1416. #define MAPI_DIAG_PROHIBITED_TO_CONVERT MAPI_DIAG( 9 )
  1417. #define MAPI_DIAG_CONVERSION_UNSUBSCRIBED MAPI_DIAG( 10 )
  1418. #define MAPI_DIAG_PARAMETERS_INVALID MAPI_DIAG( 11 )
  1419. #define MAPI_DIAG_CONTENT_SYNTAX_IN_ERROR MAPI_DIAG( 12 )
  1420. #define MAPI_DIAG_LENGTH_CONSTRAINT_VIOLATD MAPI_DIAG( 13 )
  1421. #define MAPI_DIAG_NUMBER_CONSTRAINT_VIOLATD MAPI_DIAG( 14 )
  1422. #define MAPI_DIAG_CONTENT_TYPE_UNSUPPORTED MAPI_DIAG( 15 )
  1423. #define MAPI_DIAG_TOO_MANY_RECIPIENTS MAPI_DIAG( 16 )
  1424. #define MAPI_DIAG_NO_BILATERAL_AGREEMENT MAPI_DIAG( 17 )
  1425. #define MAPI_DIAG_CRITICAL_FUNC_UNSUPPORTED MAPI_DIAG( 18 )
  1426. #define MAPI_DIAG_CONVERSION_LOSS_PROHIB MAPI_DIAG( 19 )
  1427. #define MAPI_DIAG_LINE_TOO_LONG MAPI_DIAG( 20 )
  1428. #define MAPI_DIAG_PAGE_TOO_LONG MAPI_DIAG( 21 )
  1429. #define MAPI_DIAG_PICTORIAL_SYMBOL_LOST MAPI_DIAG( 22 )
  1430. #define MAPI_DIAG_PUNCTUATION_SYMBOL_LOST MAPI_DIAG( 23 )
  1431. #define MAPI_DIAG_ALPHABETIC_CHARACTER_LOST MAPI_DIAG( 24 )
  1432. #define MAPI_DIAG_MULTIPLE_INFO_LOSSES MAPI_DIAG( 25 )
  1433. #define MAPI_DIAG_REASSIGNMENT_PROHIBITED MAPI_DIAG( 26 )
  1434. #define MAPI_DIAG_REDIRECTION_LOOP_DETECTED MAPI_DIAG( 27 )
  1435. #define MAPI_DIAG_EXPANSION_PROHIBITED MAPI_DIAG( 28 )
  1436. #define MAPI_DIAG_SUBMISSION_PROHIBITED MAPI_DIAG( 29 )
  1437. #define MAPI_DIAG_EXPANSION_FAILED MAPI_DIAG( 30 )
  1438. #define MAPI_DIAG_RENDITION_UNSUPPORTED MAPI_DIAG( 31 )
  1439. #define MAPI_DIAG_MAIL_ADDRESS_INCORRECT MAPI_DIAG( 32 )
  1440. #define MAPI_DIAG_MAIL_OFFICE_INCOR_OR_INVD MAPI_DIAG( 33 )
  1441. #define MAPI_DIAG_MAIL_ADDRESS_INCOMPLETE MAPI_DIAG( 34 )
  1442. #define MAPI_DIAG_MAIL_RECIPIENT_UNKNOWN MAPI_DIAG( 35 )
  1443. #define MAPI_DIAG_MAIL_RECIPIENT_DECEASED MAPI_DIAG( 36 )
  1444. #define MAPI_DIAG_MAIL_ORGANIZATION_EXPIRED MAPI_DIAG( 37 )
  1445. #define MAPI_DIAG_MAIL_REFUSED MAPI_DIAG( 38 )
  1446. #define MAPI_DIAG_MAIL_UNCLAIMED MAPI_DIAG( 39 )
  1447. #define MAPI_DIAG_MAIL_RECIPIENT_MOVED MAPI_DIAG( 40 )
  1448. #define MAPI_DIAG_MAIL_RECIPIENT_TRAVELLING MAPI_DIAG( 41 )
  1449. #define MAPI_DIAG_MAIL_RECIPIENT_DEPARTED MAPI_DIAG( 42 )
  1450. #define MAPI_DIAG_MAIL_NEW_ADDRESS_UNKNOWN MAPI_DIAG( 43 )
  1451. #define MAPI_DIAG_MAIL_FORWARDING_UNWANTED MAPI_DIAG( 44 )
  1452. #define MAPI_DIAG_MAIL_FORWARDING_PROHIB MAPI_DIAG( 45 )
  1453. #define MAPI_DIAG_SECURE_MESSAGING_ERROR MAPI_DIAG( 46 )
  1454. #define MAPI_DIAG_DOWNGRADING_IMPOSSIBLE MAPI_DIAG( 47 )
  1455. /* Values of PR_DELIVERY_POINT (MH_T_DELIVERY_POINT) */
  1456. #define MAPI_MH_DP_PUBLIC_UA ((ULONG) 0)
  1457. #define MAPI_MH_DP_PRIVATE_UA ((ULONG) 1)
  1458. #define MAPI_MH_DP_MS ((ULONG) 2)
  1459. #define MAPI_MH_DP_ML ((ULONG) 3)
  1460. #define MAPI_MH_DP_PDAU ((ULONG) 4)
  1461. #define MAPI_MH_DP_PDS_PATRON ((ULONG) 5)
  1462. #define MAPI_MH_DP_OTHER_AU ((ULONG) 6)
  1463. #define MAPI_IMAILUSER_METHODS(IPURE)
  1464. #undef INTERFACE
  1465. #define INTERFACE IMailUser
  1466. DECLARE_MAPI_INTERFACE_(IMailUser, IMAPIProp)
  1467. {
  1468. BEGIN_INTERFACE
  1469. MAPI_IUNKNOWN_METHODS(PURE)
  1470. MAPI_IMAPIPROP_METHODS(PURE)
  1471. MAPI_IMAILUSER_METHODS(PURE)
  1472. };
  1473. /* IDistList Interface ----------------------------------------------------- */
  1474. #define MAPI_IDISTLIST_METHODS(IPURE) \
  1475. MAPIMETHOD(CreateEntry) \
  1476. (THIS_ ULONG cbEntryID, \
  1477. LPENTRYID lpEntryID, \
  1478. ULONG ulCreateFlags, \
  1479. LPMAPIPROP FAR * lppMAPIPropEntry) IPURE; \
  1480. MAPIMETHOD(CopyEntries) \
  1481. (THIS_ LPENTRYLIST lpEntries, \
  1482. ULONG ulUIParam, \
  1483. LPMAPIPROGRESS lpProgress, \
  1484. ULONG ulFlags) IPURE; \
  1485. MAPIMETHOD(DeleteEntries) \
  1486. (THIS_ LPENTRYLIST lpEntries, \
  1487. ULONG ulFlags) IPURE; \
  1488. MAPIMETHOD(ResolveNames) \
  1489. (THIS_ LPSPropTagArray lpPropTagArray, \
  1490. ULONG ulFlags, \
  1491. LPADRLIST lpAdrList, \
  1492. LPFlagList lpFlagList) IPURE; \
  1493. #undef INTERFACE
  1494. #define INTERFACE IDistList
  1495. DECLARE_MAPI_INTERFACE_(IDistList, IMAPIContainer)
  1496. {
  1497. BEGIN_INTERFACE
  1498. MAPI_IUNKNOWN_METHODS(PURE)
  1499. MAPI_IMAPIPROP_METHODS(PURE)
  1500. MAPI_IMAPICONTAINER_METHODS(PURE)
  1501. MAPI_IDISTLIST_METHODS(PURE)
  1502. };
  1503. /* IMAPIFolder Interface --------------------------------------------------- */
  1504. /* IMAPIFolder folder type (enum) */
  1505. #define FOLDER_ROOT ((ULONG) 0x00000000)
  1506. #define FOLDER_GENERIC ((ULONG) 0x00000001)
  1507. #define FOLDER_SEARCH ((ULONG) 0x00000002)
  1508. /* CreateMessage */
  1509. /****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */
  1510. /****** MAPI_ASSOCIATED ((ULONG) 0x00000040) below */
  1511. /* CopyMessages */
  1512. #define MESSAGE_MOVE ((ULONG) 0x00000001)
  1513. #define MESSAGE_DIALOG ((ULONG) 0x00000002)
  1514. /****** MAPI_DECLINE_OK ((ULONG) 0x00000004) above */
  1515. /* CreateFolder */
  1516. #define OPEN_IF_EXISTS ((ULONG) 0x00000001)
  1517. /****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */
  1518. /****** MAPI_UNICODE ((ULONG) 0x80000000) above */
  1519. /* DeleteFolder */
  1520. #define DEL_MESSAGES ((ULONG) 0x00000001)
  1521. #define FOLDER_DIALOG ((ULONG) 0x00000002)
  1522. #define DEL_FOLDERS ((ULONG) 0x00000004)
  1523. /* EmptyFolder */
  1524. #define DEL_ASSOCIATED ((ULONG) 0x00000008)
  1525. /* CopyFolder */
  1526. #define FOLDER_MOVE ((ULONG) 0x00000001)
  1527. /****** FOLDER_DIALOG ((ULONG) 0x00000002) above */
  1528. /****** MAPI_DECLINE_OK ((ULONG) 0x00000004) above */
  1529. #define COPY_SUBFOLDERS ((ULONG) 0x00000010)
  1530. /****** MAPI_UNICODE ((ULONG) 0x80000000) above */
  1531. /* SetReadFlags */
  1532. /****** SUPPRESS_RECEIPT ((ULONG) 0x00000001) below */
  1533. /****** FOLDER_DIALOG ((ULONG) 0x00000002) above */
  1534. /****** CLEAR_READ_FLAG ((ULONG) 0x00000004) below */
  1535. /****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */
  1536. /****** GENERATE_RECEIPT_ONLY ((ULONG) 0x00000010) below */
  1537. /****** CLEAR_RN_PENDING ((ULONG) 0x00000020) below */
  1538. /****** CLEAR_NRN_PENDING ((ULONG) 0x00000040) below */
  1539. /* GetMessageStatus */
  1540. #define MSGSTATUS_HIGHLIGHTED ((ULONG) 0x00000001)
  1541. #define MSGSTATUS_TAGGED ((ULONG) 0x00000002)
  1542. #define MSGSTATUS_HIDDEN ((ULONG) 0x00000004)
  1543. #define MSGSTATUS_DELMARKED ((ULONG) 0x00000008)
  1544. /* Bits for remote message status */
  1545. #define MSGSTATUS_REMOTE_DOWNLOAD ((ULONG) 0x00001000)
  1546. #define MSGSTATUS_REMOTE_DELETE ((ULONG) 0x00002000)
  1547. /* SaveContentsSort */
  1548. #define RECURSIVE_SORT ((ULONG) 0x00000002)
  1549. /* PR_STATUS property */
  1550. #define FLDSTATUS_HIGHLIGHTED ((ULONG) 0x00000001)
  1551. #define FLDSTATUS_TAGGED ((ULONG) 0x00000002)
  1552. #define FLDSTATUS_HIDDEN ((ULONG) 0x00000004)
  1553. #define FLDSTATUS_DELMARKED ((ULONG) 0x00000008)
  1554. #define MAPI_IMAPIFOLDER_METHODS(IPURE) \
  1555. MAPIMETHOD(CreateMessage) \
  1556. (THIS_ LPCIID lpInterface, \
  1557. ULONG ulFlags, \
  1558. LPMESSAGE FAR * lppMessage) IPURE; \
  1559. MAPIMETHOD(CopyMessages) \
  1560. (THIS_ LPENTRYLIST lpMsgList, \
  1561. LPCIID lpInterface, \
  1562. LPVOID lpDestFolder, \
  1563. ULONG ulUIParam, \
  1564. LPMAPIPROGRESS lpProgress, \
  1565. ULONG ulFlags) IPURE; \
  1566. MAPIMETHOD(DeleteMessages) \
  1567. (THIS_ LPENTRYLIST lpMsgList, \
  1568. ULONG ulUIParam, \
  1569. LPMAPIPROGRESS lpProgress, \
  1570. ULONG ulFlags) IPURE; \
  1571. MAPIMETHOD(CreateFolder) \
  1572. (THIS_ ULONG ulFolderType, \
  1573. LPTSTR lpszFolderName, \
  1574. LPTSTR lpszFolderComment, \
  1575. LPCIID lpInterface, \
  1576. ULONG ulFlags, \
  1577. LPMAPIFOLDER FAR * lppFolder) IPURE; \
  1578. MAPIMETHOD(CopyFolder) \
  1579. (THIS_ ULONG cbEntryID, \
  1580. LPENTRYID lpEntryID, \
  1581. LPCIID lpInterface, \
  1582. LPVOID lpDestFolder, \
  1583. LPTSTR lpszNewFolderName, \
  1584. ULONG ulUIParam, \
  1585. LPMAPIPROGRESS lpProgress, \
  1586. ULONG ulFlags) IPURE; \
  1587. MAPIMETHOD(DeleteFolder) \
  1588. (THIS_ ULONG cbEntryID, \
  1589. LPENTRYID lpEntryID, \
  1590. ULONG ulUIParam, \
  1591. LPMAPIPROGRESS lpProgress, \
  1592. ULONG ulFlags) IPURE; \
  1593. MAPIMETHOD(SetReadFlags) \
  1594. (THIS_ LPENTRYLIST lpMsgList, \
  1595. ULONG ulUIParam, \
  1596. LPMAPIPROGRESS lpProgress, \
  1597. ULONG ulFlags) IPURE; \
  1598. MAPIMETHOD(GetMessageStatus) \
  1599. (THIS_ ULONG cbEntryID, \
  1600. LPENTRYID lpEntryID, \
  1601. ULONG ulFlags, \
  1602. ULONG FAR * lpulMessageStatus) IPURE; \
  1603. MAPIMETHOD(SetMessageStatus) \
  1604. (THIS_ ULONG cbEntryID, \
  1605. LPENTRYID lpEntryID, \
  1606. ULONG ulNewStatus, \
  1607. ULONG ulNewStatusMask, \
  1608. ULONG FAR * lpulOldStatus) IPURE; \
  1609. MAPIMETHOD(SaveContentsSort) \
  1610. (THIS_ LPSSortOrderSet lpSortCriteria, \
  1611. ULONG ulFlags) IPURE; \
  1612. MAPIMETHOD(EmptyFolder) \
  1613. (THIS_ ULONG ulUIParam, \
  1614. LPMAPIPROGRESS lpProgress, \
  1615. ULONG ulFlags) IPURE; \
  1616. #undef INTERFACE
  1617. #define INTERFACE IMAPIFolder
  1618. DECLARE_MAPI_INTERFACE_(IMAPIFolder, IMAPIContainer)
  1619. {
  1620. BEGIN_INTERFACE
  1621. MAPI_IUNKNOWN_METHODS(PURE)
  1622. MAPI_IMAPIPROP_METHODS(PURE)
  1623. MAPI_IMAPICONTAINER_METHODS(PURE)
  1624. MAPI_IMAPIFOLDER_METHODS(PURE)
  1625. };
  1626. /* IMsgStore Interface ----------------------------------------------------- */
  1627. /* PR_STORE_SUPPORT_MASK bits */
  1628. #define STORE_ENTRYID_UNIQUE ((ULONG) 0x00000001)
  1629. #define STORE_READONLY ((ULONG) 0x00000002)
  1630. #define STORE_SEARCH_OK ((ULONG) 0x00000004)
  1631. #define STORE_MODIFY_OK ((ULONG) 0x00000008)
  1632. #define STORE_CREATE_OK ((ULONG) 0x00000010)
  1633. #define STORE_ATTACH_OK ((ULONG) 0x00000020)
  1634. #define STORE_OLE_OK ((ULONG) 0x00000040)
  1635. #define STORE_SUBMIT_OK ((ULONG) 0x00000080)
  1636. #define STORE_NOTIFY_OK ((ULONG) 0x00000100)
  1637. #define STORE_MV_PROPS_OK ((ULONG) 0x00000200)
  1638. #define STORE_CATEGORIZE_OK ((ULONG) 0x00000400)
  1639. #define STORE_RTF_OK ((ULONG) 0x00000800)
  1640. #define STORE_RESTRICTION_OK ((ULONG) 0x00001000)
  1641. #define STORE_SORT_OK ((ULONG) 0x00002000)
  1642. #define STORE_PUBLIC_FOLDERS ((ULONG) 0x00004000)
  1643. #define STORE_UNCOMPRESSED_RTF ((ULONG) 0x00008000)
  1644. /* PR_STORE_STATE bits, try not to collide with PR_STORE_SUPPORT_MASK */
  1645. #define STORE_HAS_SEARCHES ((ULONG) 0x01000000)
  1646. /* OpenEntry() */
  1647. /****** MAPI_MODIFY ((ULONG) 0x00000001) above */
  1648. /****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */
  1649. /****** MAPI_BEST_ACCESS ((ULONG) 0x00000010) above */
  1650. /* SetReceiveFolder() */
  1651. /****** MAPI_UNICODE ((ULONG) 0x80000000) above */
  1652. /* GetReceiveFolder() */
  1653. /****** MAPI_UNICODE ((ULONG) 0x80000000) above */
  1654. /* GetReceiveFolderTable() */
  1655. /****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */
  1656. /* StoreLogoff() */
  1657. #define LOGOFF_NO_WAIT ((ULONG) 0x00000001)
  1658. #define LOGOFF_ORDERLY ((ULONG) 0x00000002)
  1659. #define LOGOFF_PURGE ((ULONG) 0x00000004)
  1660. #define LOGOFF_ABORT ((ULONG) 0x00000008)
  1661. #define LOGOFF_QUIET ((ULONG) 0x00000010)
  1662. #define LOGOFF_COMPLETE ((ULONG) 0x00010000)
  1663. #define LOGOFF_INBOUND ((ULONG) 0x00020000)
  1664. #define LOGOFF_OUTBOUND ((ULONG) 0x00040000)
  1665. #define LOGOFF_OUTBOUND_QUEUE ((ULONG) 0x00080000)
  1666. /* SetLockState() */
  1667. #define MSG_LOCKED ((ULONG) 0x00000001)
  1668. #define MSG_UNLOCKED ((ULONG) 0x00000000)
  1669. /* Flag bits for PR_VALID_FOLDER_MASK */
  1670. #define FOLDER_IPM_SUBTREE_VALID ((ULONG) 0x00000001)
  1671. #define FOLDER_IPM_INBOX_VALID ((ULONG) 0x00000002)
  1672. #define FOLDER_IPM_OUTBOX_VALID ((ULONG) 0x00000004)
  1673. #define FOLDER_IPM_WASTEBASKET_VALID ((ULONG) 0x00000008)
  1674. #define FOLDER_IPM_SENTMAIL_VALID ((ULONG) 0x00000010)
  1675. #define FOLDER_VIEWS_VALID ((ULONG) 0x00000020)
  1676. #define FOLDER_COMMON_VIEWS_VALID ((ULONG) 0x00000040)
  1677. #define FOLDER_FINDER_VALID ((ULONG) 0x00000080)
  1678. #define MAPI_IMSGSTORE_METHODS(IPURE) \
  1679. MAPIMETHOD(Advise) \
  1680. (THIS_ ULONG cbEntryID, \
  1681. LPENTRYID lpEntryID, \
  1682. ULONG ulEventMask, \
  1683. LPMAPIADVISESINK lpAdviseSink, \
  1684. ULONG FAR * lpulConnection) IPURE; \
  1685. MAPIMETHOD(Unadvise) \
  1686. (THIS_ ULONG ulConnection) IPURE; \
  1687. MAPIMETHOD(CompareEntryIDs) \
  1688. (THIS_ ULONG cbEntryID1, \
  1689. LPENTRYID lpEntryID1, \
  1690. ULONG cbEntryID2, \
  1691. LPENTRYID lpEntryID2, \
  1692. ULONG ulFlags, \
  1693. ULONG FAR * lpulResult) IPURE; \
  1694. MAPIMETHOD(OpenEntry) \
  1695. (THIS_ ULONG cbEntryID, \
  1696. LPENTRYID lpEntryID, \
  1697. LPCIID lpInterface, \
  1698. ULONG ulFlags, \
  1699. ULONG FAR * lpulObjType, \
  1700. LPUNKNOWN FAR * lppUnk) IPURE; \
  1701. MAPIMETHOD(SetReceiveFolder) \
  1702. (THIS_ LPTSTR lpszMessageClass, \
  1703. ULONG ulFlags, \
  1704. ULONG cbEntryID, \
  1705. LPENTRYID lpEntryID) IPURE; \
  1706. MAPIMETHOD(GetReceiveFolder) \
  1707. (THIS_ LPTSTR lpszMessageClass, \
  1708. ULONG ulFlags, \
  1709. ULONG FAR * lpcbEntryID, \
  1710. LPENTRYID FAR * lppEntryID, \
  1711. LPTSTR FAR * lppszExplicitClass) IPURE; \
  1712. MAPIMETHOD(GetReceiveFolderTable) \
  1713. (THIS_ ULONG ulFlags, \
  1714. LPMAPITABLE FAR * lppTable) IPURE; \
  1715. MAPIMETHOD(StoreLogoff) \
  1716. (THIS_ ULONG FAR * lpulFlags) IPURE; \
  1717. MAPIMETHOD(AbortSubmit) \
  1718. (THIS_ ULONG cbEntryID, \
  1719. LPENTRYID lpEntryID, \
  1720. ULONG ulFlags) IPURE; \
  1721. MAPIMETHOD(GetOutgoingQueue) \
  1722. (THIS_ ULONG ulFlags, \
  1723. LPMAPITABLE FAR * lppTable) IPURE; \
  1724. MAPIMETHOD(SetLockState) \
  1725. (THIS_ LPMESSAGE lpMessage, \
  1726. ULONG ulLockState) IPURE; \
  1727. MAPIMETHOD(FinishedMsg) \
  1728. (THIS_ ULONG ulFlags, \
  1729. ULONG cbEntryID, \
  1730. LPENTRYID lpEntryID) IPURE; \
  1731. MAPIMETHOD(NotifyNewMail) \
  1732. (THIS_ LPNOTIFICATION lpNotification) IPURE; \
  1733. #undef INTERFACE
  1734. #define INTERFACE IMsgStore
  1735. DECLARE_MAPI_INTERFACE_(IMsgStore, IMAPIProp)
  1736. {
  1737. BEGIN_INTERFACE
  1738. MAPI_IUNKNOWN_METHODS(PURE)
  1739. MAPI_IMAPIPROP_METHODS(PURE)
  1740. MAPI_IMSGSTORE_METHODS(PURE)
  1741. };
  1742. /* IMessage Interface ------------------------------------------------------ */
  1743. /* SubmitMessage */
  1744. #define FORCE_SUBMIT ((ULONG) 0x00000001)
  1745. /* Flags defined in PR_MESSAGE_FLAGS */
  1746. #define MSGFLAG_READ ((ULONG) 0x00000001)
  1747. #define MSGFLAG_UNMODIFIED ((ULONG) 0x00000002)
  1748. #define MSGFLAG_SUBMIT ((ULONG) 0x00000004)
  1749. #define MSGFLAG_UNSENT ((ULONG) 0x00000008)
  1750. #define MSGFLAG_HASATTACH ((ULONG) 0x00000010)
  1751. #define MSGFLAG_FROMME ((ULONG) 0x00000020)
  1752. #define MSGFLAG_ASSOCIATED ((ULONG) 0x00000040)
  1753. #define MSGFLAG_RESEND ((ULONG) 0x00000080)
  1754. #define MSGFLAG_RN_PENDING ((ULONG) 0x00000100)
  1755. #define MSGFLAG_NRN_PENDING ((ULONG) 0x00000200)
  1756. /* Flags defined in PR_SUBMIT_FLAGS */
  1757. #define SUBMITFLAG_LOCKED ((ULONG) 0x00000001)
  1758. #define SUBMITFLAG_PREPROCESS ((ULONG) 0x00000002)
  1759. /* GetAttachmentTable() */
  1760. /****** MAPI_UNICODE ((ULONG) 0x80000000) above */
  1761. /* GetRecipientTable() */
  1762. /****** MAPI_UNICODE ((ULONG) 0x80000000) above */
  1763. /* ModifyRecipients */
  1764. /* ((ULONG) 0x00000001 is not a valid flag on ModifyRecipients. */
  1765. #define MODRECIP_ADD ((ULONG) 0x00000002)
  1766. #define MODRECIP_MODIFY ((ULONG) 0x00000004)
  1767. #define MODRECIP_REMOVE ((ULONG) 0x00000008)
  1768. /* SetReadFlag */
  1769. #define SUPPRESS_RECEIPT ((ULONG) 0x00000001)
  1770. #define CLEAR_READ_FLAG ((ULONG) 0x00000004)
  1771. /****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) below */
  1772. #define GENERATE_RECEIPT_ONLY ((ULONG) 0x00000010)
  1773. #define CLEAR_RN_PENDING ((ULONG) 0x00000020)
  1774. #define CLEAR_NRN_PENDING ((ULONG) 0x00000040)
  1775. /* DeleteAttach */
  1776. #define ATTACH_DIALOG ((ULONG) 0x00000001)
  1777. /* PR_SECURITY values */
  1778. #define SECURITY_SIGNED ((ULONG) 0x00000001)
  1779. #define SECURITY_ENCRYPTED ((ULONG) 0x00000002)
  1780. /* PR_PRIORITY values */
  1781. #define PRIO_URGENT ((long) 1)
  1782. #define PRIO_NORMAL ((long) 0)
  1783. #define PRIO_NONURGENT ((long) -1)
  1784. /* PR_SENSITIVITY values */
  1785. #define SENSITIVITY_NONE ((ULONG) 0x00000000)
  1786. #define SENSITIVITY_PERSONAL ((ULONG) 0x00000001)
  1787. #define SENSITIVITY_PRIVATE ((ULONG) 0x00000002)
  1788. #define SENSITIVITY_COMPANY_CONFIDENTIAL ((ULONG) 0x00000003)
  1789. /* PR_IMPORTANCE values */
  1790. #define IMPORTANCE_LOW ((long) 0)
  1791. #define IMPORTANCE_NORMAL ((long) 1)
  1792. #define IMPORTANCE_HIGH ((long) 2)
  1793. #define MAPI_IMESSAGE_METHODS(IPURE) \
  1794. MAPIMETHOD(GetAttachmentTable) \
  1795. (THIS_ ULONG ulFlags, \
  1796. LPMAPITABLE FAR * lppTable) IPURE; \
  1797. MAPIMETHOD(OpenAttach) \
  1798. (THIS_ ULONG ulAttachmentNum, \
  1799. LPCIID lpInterface, \
  1800. ULONG ulFlags, \
  1801. LPATTACH FAR * lppAttach) IPURE; \
  1802. MAPIMETHOD(CreateAttach) \
  1803. (THIS_ LPCIID lpInterface, \
  1804. ULONG ulFlags, \
  1805. ULONG FAR * lpulAttachmentNum, \
  1806. LPATTACH FAR * lppAttach) IPURE; \
  1807. MAPIMETHOD(DeleteAttach) \
  1808. (THIS_ ULONG ulAttachmentNum, \
  1809. ULONG ulUIParam, \
  1810. LPMAPIPROGRESS lpProgress, \
  1811. ULONG ulFlags) IPURE; \
  1812. MAPIMETHOD(GetRecipientTable) \
  1813. (THIS_ ULONG ulFlags, \
  1814. LPMAPITABLE FAR * lppTable) IPURE; \
  1815. MAPIMETHOD(ModifyRecipients) \
  1816. (THIS_ ULONG ulFlags, \
  1817. LPADRLIST lpMods) IPURE; \
  1818. MAPIMETHOD(SubmitMessage) \
  1819. (THIS_ ULONG ulFlags) IPURE; \
  1820. MAPIMETHOD(SetReadFlag) \
  1821. (THIS_ ULONG ulFlags) IPURE; \
  1822. #undef INTERFACE
  1823. #define INTERFACE IMessage
  1824. DECLARE_MAPI_INTERFACE_(IMessage, IMAPIProp)
  1825. {
  1826. BEGIN_INTERFACE
  1827. MAPI_IUNKNOWN_METHODS(PURE)
  1828. MAPI_IMAPIPROP_METHODS(PURE)
  1829. MAPI_IMESSAGE_METHODS(PURE)
  1830. };
  1831. /* IAttach Interface ------------------------------------------------------- */
  1832. /* IAttach attachment methods: PR_ATTACH_METHOD values */
  1833. #define NO_ATTACHMENT ((ULONG) 0x00000000)
  1834. #define ATTACH_BY_VALUE ((ULONG) 0x00000001)
  1835. #define ATTACH_BY_REFERENCE ((ULONG) 0x00000002)
  1836. #define ATTACH_BY_REF_RESOLVE ((ULONG) 0x00000003)
  1837. #define ATTACH_BY_REF_ONLY ((ULONG) 0x00000004)
  1838. #define ATTACH_EMBEDDED_MSG ((ULONG) 0x00000005)
  1839. #define ATTACH_OLE ((ULONG) 0x00000006)
  1840. #define MAPI_IATTACH_METHODS(IPURE)
  1841. #undef INTERFACE
  1842. #define INTERFACE IAttach
  1843. DECLARE_MAPI_INTERFACE_(IAttach, IMAPIProp)
  1844. {
  1845. BEGIN_INTERFACE
  1846. MAPI_IUNKNOWN_METHODS(PURE)
  1847. MAPI_IMAPIPROP_METHODS(PURE)
  1848. MAPI_IATTACH_METHODS(PURE)
  1849. };
  1850. /* --------------------------------- */
  1851. /* Address Book interface definition */
  1852. /* ADRPARM ulFlags - top 4 bits used for versioning */
  1853. #define GET_ADRPARM_VERSION(ulFlags) (((ULONG)ulFlags) & 0xF0000000)
  1854. #define SET_ADRPARM_VERSION(ulFlags, ulVersion) (((ULONG)ulVersion) | (((ULONG)ulFlags) & 0x0FFFFFFF))
  1855. /* Current versions of ADRPARM */
  1856. #define ADRPARM_HELP_CTX ((ULONG) 0x00000000)
  1857. /* ulFlags - bit fields */
  1858. #define DIALOG_MODAL ((ULONG) 0x00000001)
  1859. #define DIALOG_SDI ((ULONG) 0x00000002)
  1860. #define DIALOG_OPTIONS ((ULONG) 0x00000004)
  1861. #define ADDRESS_ONE ((ULONG) 0x00000008)
  1862. #define AB_SELECTONLY ((ULONG) 0x00000010)
  1863. #define AB_RESOLVE ((ULONG) 0x00000020)
  1864. /* --------------------------------- */
  1865. /* PR_DISPLAY_TYPEs */
  1866. /*
  1867. * These standard display types are
  1868. * by default handled by MAPI.
  1869. * They have default icons associated
  1870. * with them.
  1871. */
  1872. /* For address book contents tables */
  1873. #define DT_MAILUSER ((ULONG) 0x00000000)
  1874. #define DT_DISTLIST ((ULONG) 0x00000001)
  1875. #define DT_FORUM ((ULONG) 0x00000002)
  1876. #define DT_AGENT ((ULONG) 0x00000003)
  1877. #define DT_ORGANIZATION ((ULONG) 0x00000004)
  1878. #define DT_PRIVATE_DISTLIST ((ULONG) 0x00000005)
  1879. #define DT_REMOTE_MAILUSER ((ULONG) 0x00000006)
  1880. /* For address book hierarchy tables */
  1881. #define DT_MODIFIABLE ((ULONG) 0x00010000)
  1882. #define DT_GLOBAL ((ULONG) 0x00020000)
  1883. #define DT_LOCAL ((ULONG) 0x00030000)
  1884. #define DT_WAN ((ULONG) 0x00040000)
  1885. #define DT_NOT_SPECIFIC ((ULONG) 0x00050000)
  1886. /* For folder hierarchy tables */
  1887. #define DT_FOLDER ((ULONG) 0x01000000)
  1888. #define DT_FOLDER_LINK ((ULONG) 0x02000000)
  1889. #define DT_FOLDER_SPECIAL ((ULONG) 0x04000000)
  1890. /* Accelerator callback for DIALOG_SDI form of AB UI */
  1891. typedef BOOL (STDMETHODCALLTYPE ACCELERATEABSDI)(ULONG ulUIParam,
  1892. LPVOID lpvmsg);
  1893. typedef ACCELERATEABSDI FAR * LPFNABSDI;
  1894. /* Callback to application telling it that the DIALOG_SDI form of the */
  1895. /* AB UI has been dismissed. This is so that the above LPFNABSDI */
  1896. /* function doesn't keep being called. */
  1897. typedef void (STDMETHODCALLTYPE DISMISSMODELESS)(ULONG ulUIParam,
  1898. LPVOID lpvContext);
  1899. typedef DISMISSMODELESS FAR * LPFNDISMISS;
  1900. /*
  1901. * Prototype for the client function hooked to an optional button on
  1902. * the address book dialog
  1903. */
  1904. typedef SCODE (STDMETHODCALLTYPE FAR * LPFNBUTTON)(
  1905. ULONG ulUIParam,
  1906. LPVOID lpvContext,
  1907. ULONG cbEntryID,
  1908. LPENTRYID lpSelection,
  1909. ULONG ulFlags
  1910. );
  1911. /* Parameters for the address book dialog */
  1912. typedef struct _ADRPARM
  1913. {
  1914. ULONG cbABContEntryID;
  1915. LPENTRYID lpABContEntryID;
  1916. ULONG ulFlags;
  1917. LPVOID lpReserved;
  1918. ULONG ulHelpContext;
  1919. LPTSTR lpszHelpFileName;
  1920. LPFNABSDI lpfnABSDI;
  1921. LPFNDISMISS lpfnDismiss;
  1922. LPVOID lpvDismissContext;
  1923. LPTSTR lpszCaption;
  1924. LPTSTR lpszNewEntryTitle;
  1925. LPTSTR lpszDestWellsTitle;
  1926. ULONG cDestFields;
  1927. ULONG nDestFieldFocus;
  1928. LPTSTR FAR * lppszDestTitles;
  1929. ULONG FAR * lpulDestComps;
  1930. LPSRestriction lpContRestriction;
  1931. LPSRestriction lpHierRestriction;
  1932. } ADRPARM, FAR * LPADRPARM;
  1933. /* ------------ */
  1934. /* Random flags */
  1935. /* Flag for deferred error */
  1936. #define MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008)
  1937. /* Flag for creating and using Folder Associated Information Messages */
  1938. #define MAPI_ASSOCIATED ((ULONG) 0x00000040)
  1939. /* Flags for OpenMessageStore() */
  1940. #define MDB_NO_DIALOG ((ULONG) 0x00000001)
  1941. #define MDB_WRITE ((ULONG) 0x00000004)
  1942. /****** MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008) above */
  1943. /****** MAPI_BEST_ACCESS ((ULONG) 0x00000010) above */
  1944. #define MDB_TEMPORARY ((ULONG) 0x00000020)
  1945. #define MDB_NO_MAIL ((ULONG) 0x00000080)
  1946. /* Flags for OpenAddressBook */
  1947. #define AB_NO_DIALOG ((ULONG) 0x00000001)
  1948. /* IMAPIControl Interface -------------------------------------------------- */
  1949. /* Interface used in controls (particularly the button) defined by */
  1950. /* Display Tables. */
  1951. /* Flags for GetState */
  1952. #define MAPI_ENABLED ((ULONG) 0x00000000)
  1953. #define MAPI_DISABLED ((ULONG) 0x00000001)
  1954. #define MAPI_IMAPICONTROL_METHODS(IPURE) \
  1955. MAPIMETHOD(GetLastError) \
  1956. (THIS_ HRESULT hResult, \
  1957. ULONG ulFlags, \
  1958. LPMAPIERROR FAR * lppMAPIError) IPURE; \
  1959. MAPIMETHOD(Activate) \
  1960. (THIS_ ULONG ulFlags, \
  1961. ULONG ulUIParam) IPURE; \
  1962. MAPIMETHOD(GetState) \
  1963. (THIS_ ULONG ulFlags, \
  1964. ULONG FAR * lpulState) IPURE; \
  1965. #undef INTERFACE
  1966. #define INTERFACE IMAPIControl
  1967. DECLARE_MAPI_INTERFACE_(IMAPIControl, IUnknown)
  1968. {
  1969. BEGIN_INTERFACE
  1970. MAPI_IUNKNOWN_METHODS(PURE)
  1971. MAPI_IMAPICONTROL_METHODS(PURE)
  1972. };
  1973. DECLARE_MAPI_INTERFACE_PTR(IMAPIControl, LPMAPICONTROL);
  1974. /* Display Tables ---------------------------------------------------------- */
  1975. /* Flags used in display tables - that is, PR_CONTROL_FLAGS */
  1976. #define DT_MULTILINE ((ULONG) 0x00000001)
  1977. #define DT_EDITABLE ((ULONG) 0x00000002)
  1978. #define DT_REQUIRED ((ULONG) 0x00000004)
  1979. #define DT_SET_IMMEDIATE ((ULONG) 0x00000008)
  1980. #define DT_PASSWORD_EDIT ((ULONG) 0x00000010)
  1981. #define DT_ACCEPT_DBCS ((ULONG) 0x00000020)
  1982. #define DT_SET_SELECTION ((ULONG) 0x00000040)
  1983. /* Display Table structures */
  1984. #define DTCT_LABEL ((ULONG) 0x00000000)
  1985. #define DTCT_EDIT ((ULONG) 0x00000001)
  1986. #define DTCT_LBX ((ULONG) 0x00000002)
  1987. #define DTCT_COMBOBOX ((ULONG) 0x00000003)
  1988. #define DTCT_DDLBX ((ULONG) 0x00000004)
  1989. #define DTCT_CHECKBOX ((ULONG) 0x00000005)
  1990. #define DTCT_GROUPBOX ((ULONG) 0x00000006)
  1991. #define DTCT_BUTTON ((ULONG) 0x00000007)
  1992. #define DTCT_PAGE ((ULONG) 0x00000008)
  1993. #define DTCT_RADIOBUTTON ((ULONG) 0x00000009)
  1994. #define DTCT_MVLISTBOX ((ULONG) 0x0000000B)
  1995. #define DTCT_MVDDLBX ((ULONG) 0x0000000C)
  1996. /* Labels */
  1997. /* Valid ulFlags:
  1998. * MAPI_UNICODE
  1999. */
  2000. typedef struct _DTBLLABEL
  2001. {
  2002. ULONG ulbLpszLabelName;
  2003. ULONG ulFlags;
  2004. } DTBLLABEL, FAR * LPDTBLLABEL;
  2005. #define SizedDtblLabel(n,u) \
  2006. struct _DTBLLABEL_ ## u \
  2007. { \
  2008. DTBLLABEL dtbllabel; \
  2009. TCHAR lpszLabelName[n]; \
  2010. } u
  2011. /* Simple Text Edits */
  2012. /* Valid ulFlags:
  2013. * MAPI_UNICODE
  2014. */
  2015. typedef struct _DTBLEDIT
  2016. {
  2017. ULONG ulbLpszCharsAllowed;
  2018. ULONG ulFlags;
  2019. ULONG ulNumCharsAllowed;
  2020. ULONG ulPropTag;
  2021. } DTBLEDIT, FAR * LPDTBLEDIT;
  2022. #define SizedDtblEdit(n,u) \
  2023. struct _DTBLEDIT_ ## u \
  2024. { \
  2025. DTBLEDIT dtbledit; \
  2026. TCHAR lpszCharsAllowed[n]; \
  2027. } u
  2028. /* List Box */
  2029. /* Valid ulFlags:
  2030. */
  2031. #define MAPI_NO_HBAR ((ULONG) 0x00000001)
  2032. #define MAPI_NO_VBAR ((ULONG) 0x00000002)
  2033. typedef struct _DTBLLBX
  2034. {
  2035. ULONG ulFlags;
  2036. ULONG ulPRSetProperty;
  2037. ULONG ulPRTableName;
  2038. } DTBLLBX, FAR * LPDTBLLBX;
  2039. /* Combo Box */
  2040. /* Valid ulFlags:
  2041. * MAPI_UNICODE
  2042. */
  2043. typedef struct _DTBLCOMBOBOX
  2044. {
  2045. ULONG ulbLpszCharsAllowed;
  2046. ULONG ulFlags;
  2047. ULONG ulNumCharsAllowed;
  2048. ULONG ulPRPropertyName;
  2049. ULONG ulPRTableName;
  2050. } DTBLCOMBOBOX, FAR * LPDTBLCOMBOBOX;
  2051. #define SizedDtblComboBox(n,u) \
  2052. struct _DTBLCOMBOBOX_ ## u \
  2053. { \
  2054. DTBLCOMBOBOX dtblcombobox; \
  2055. TCHAR lpszCharsAllowed[n]; \
  2056. } u
  2057. /* Drop Down */
  2058. /* Valid ulFlags:
  2059. * none
  2060. */
  2061. typedef struct _DTBLDDLBX
  2062. {
  2063. ULONG ulFlags;
  2064. ULONG ulPRDisplayProperty;
  2065. ULONG ulPRSetProperty;
  2066. ULONG ulPRTableName;
  2067. } DTBLDDLBX, FAR * LPDTBLDDLBX;
  2068. /* Check Box */
  2069. /* Valid ulFlags:
  2070. * MAPI_UNICODE
  2071. */
  2072. typedef struct _DTBLCHECKBOX
  2073. {
  2074. ULONG ulbLpszLabel;
  2075. ULONG ulFlags;
  2076. ULONG ulPRPropertyName;
  2077. } DTBLCHECKBOX, FAR * LPDTBLCHECKBOX;
  2078. #define SizedDtblCheckBox(n,u) \
  2079. struct _DTBLCHECKBOX_ ## u \
  2080. { \
  2081. DTBLCHECKBOX dtblcheckbox; \
  2082. TCHAR lpszLabel[n]; \
  2083. } u
  2084. /* Group Box */
  2085. /* Valid ulFlags:
  2086. * MAPI_UNICODE
  2087. */
  2088. typedef struct _DTBLGROUPBOX
  2089. {
  2090. ULONG ulbLpszLabel;
  2091. ULONG ulFlags;
  2092. } DTBLGROUPBOX, FAR * LPDTBLGROUPBOX;
  2093. #define SizedDtblGroupBox(n,u) \
  2094. struct _DTBLGROUPBOX_ ## u \
  2095. { \
  2096. DTBLGROUPBOX dtblgroupbox; \
  2097. TCHAR lpszLabel[n]; \
  2098. } u
  2099. /* Button control */
  2100. /* Valid ulFlags:
  2101. * MAPI_UNICODE
  2102. */
  2103. typedef struct _DTBLBUTTON
  2104. {
  2105. ULONG ulbLpszLabel;
  2106. ULONG ulFlags;
  2107. ULONG ulPRControl;
  2108. } DTBLBUTTON, FAR * LPDTBLBUTTON;
  2109. #define SizedDtblButton(n,u) \
  2110. struct _DTBLBUTTON_ ## u \
  2111. { \
  2112. DTBLBUTTON dtblbutton; \
  2113. TCHAR lpszLabel[n]; \
  2114. } u
  2115. /* Pages */
  2116. /* Valid ulFlags:
  2117. * MAPI_UNICODE
  2118. */
  2119. typedef struct _DTBLPAGE
  2120. {
  2121. ULONG ulbLpszLabel;
  2122. ULONG ulFlags;
  2123. ULONG ulbLpszComponent;
  2124. ULONG ulContext;
  2125. } DTBLPAGE, FAR * LPDTBLPAGE;
  2126. #define SizedDtblPage(n,n1,u) \
  2127. struct _DTBLPAGE_ ## u \
  2128. { \
  2129. DTBLPAGE dtblpage; \
  2130. TCHAR lpszLabel[n]; \
  2131. TCHAR lpszComponent[n1]; \
  2132. } u
  2133. /* Radio button */
  2134. /* Valid ulFlags:
  2135. * MAPI_UNICODE
  2136. */
  2137. typedef struct _DTBLRADIOBUTTON
  2138. {
  2139. ULONG ulbLpszLabel;
  2140. ULONG ulFlags;
  2141. ULONG ulcButtons;
  2142. ULONG ulPropTag;
  2143. long lReturnValue;
  2144. } DTBLRADIOBUTTON, FAR * LPDTBLRADIOBUTTON;
  2145. #define SizedDtblRadioButton(n,u) \
  2146. struct _DTBLRADIOBUTTON_ ## u \
  2147. { \
  2148. DTBLRADIOBUTTON dtblradiobutton; \
  2149. TCHAR lpszLabel[n]; \
  2150. } u
  2151. /* MultiValued listbox */
  2152. /* Valid ulFlags:
  2153. * none
  2154. */
  2155. typedef struct _DTBLMVLISTBOX
  2156. {
  2157. ULONG ulFlags;
  2158. ULONG ulMVPropTag;
  2159. } DTBLMVLISTBOX, FAR * LPDTBLMVLISTBOX;
  2160. /* MultiValued dropdown */
  2161. /* Valid ulFlags:
  2162. * none
  2163. */
  2164. typedef struct _DTBLMVDDLBX
  2165. {
  2166. ULONG ulFlags;
  2167. ULONG ulMVPropTag;
  2168. } DTBLMVDDLBX, FAR * LPDTBLMVDDLBX;
  2169. /* IProviderAdmin Interface ---------------------------------------------- */
  2170. /* Flags for ConfigureMsgService */
  2171. #define UI_SERVICE 0x00000002
  2172. #define SERVICE_UI_ALWAYS 0x00000002 /* Duplicate UI_SERVICE for consistency and compatibility */
  2173. #define SERVICE_UI_ALLOWED 0x00000010
  2174. #define UI_CURRENT_PROVIDER_FIRST 0x00000004
  2175. /* MSG_SERVICE_UI_READ_ONLY 0x00000008 - in MAPISPI.H */
  2176. /* GetProviderTable() */
  2177. /****** MAPI_UNICODE ((ULONG) 0x80000000) above */
  2178. /* Values for PR_RESOURCE_FLAGS in message service table */
  2179. #define MAPI_IPROVIDERADMIN_METHODS(IPURE) \
  2180. MAPIMETHOD(GetLastError) \
  2181. (THIS_ HRESULT hResult, \
  2182. ULONG ulFlags, \
  2183. LPMAPIERROR FAR * lppMAPIError) IPURE; \
  2184. MAPIMETHOD(GetProviderTable) \
  2185. (THIS_ ULONG ulFlags, \
  2186. LPMAPITABLE FAR * lppTable) IPURE; \
  2187. MAPIMETHOD(CreateProvider) \
  2188. (THIS_ LPTSTR lpszProvider, \
  2189. ULONG cValues, \
  2190. LPSPropValue lpProps, \
  2191. ULONG ulUIParam, \
  2192. ULONG ulFlags, \
  2193. MAPIUID FAR * lpUID) IPURE; \
  2194. MAPIMETHOD(DeleteProvider) \
  2195. (THIS_ LPMAPIUID lpUID) IPURE; \
  2196. MAPIMETHOD(OpenProfileSection) \
  2197. (THIS_ LPMAPIUID lpUID, \
  2198. LPCIID lpInterface, \
  2199. ULONG ulFlags, \
  2200. LPPROFSECT FAR * lppProfSect) IPURE; \
  2201. #undef INTERFACE
  2202. #define INTERFACE IProviderAdmin
  2203. DECLARE_MAPI_INTERFACE_(IProviderAdmin, IUnknown)
  2204. {
  2205. BEGIN_INTERFACE
  2206. MAPI_IUNKNOWN_METHODS(PURE)
  2207. MAPI_IPROVIDERADMIN_METHODS(PURE)
  2208. };
  2209. #ifdef __cplusplus
  2210. } /* extern "C" */
  2211. #endif
  2212. #endif /* MAPIDEFS_H */
  2213.