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.

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