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.

2681 lines
101 KiB

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