mapidefs.h 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifndef MAPIDEFS_H
  7. #define MAPIDEFS_H
  8. #ifndef _WINDOWS_
  9. #define INC_OLE2
  10. #define INC_RPC
  11. #define _OLE_H_
  12. #include <windows.h>
  13. #endif
  14. #ifndef _OLEERROR_H_
  15. #include <winerror.h>
  16. #endif
  17. #include <objbase.h>
  18. #include <stddef.h>
  19. #ifndef MAPI_DIM
  20. #define MAPI_DIM 1
  21. #endif
  22. #ifndef STDMAPIINITCALLTYPE
  23. #define STDMAPIINITCALLTYPE __cdecl
  24. #define STDINITMETHODIMP HRESULT __cdecl
  25. #define STDINITMETHODIMP_(type) type __cdecl
  26. #endif
  27. #define MAPI_NT_SERVICE ((ULONG) 0x00010000)
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. #ifndef __WCHAR_DEFINED
  32. #define __WCHAR_DEFINED
  33. typedef wchar_t WCHAR;
  34. #endif
  35. #if defined(UNICODE)
  36. typedef WCHAR TCHAR;
  37. #else
  38. typedef char TCHAR;
  39. #endif
  40. typedef WCHAR *LPWSTR;
  41. typedef const WCHAR *LPCWSTR;
  42. typedef TCHAR *LPTSTR;
  43. typedef const TCHAR *LPCTSTR;
  44. typedef BYTE *LPBYTE;
  45. typedef ULONG *LPULONG;
  46. #ifndef __LHANDLE
  47. #define __LHANDLE
  48. typedef ULONG_PTR LHANDLE,*LPLHANDLE;
  49. #endif
  50. #if !defined(_WINBASE_) && !defined(_FILETIME_)
  51. #define _FILETIME_
  52. typedef struct _FILETIME {
  53. DWORD dwLowDateTime;
  54. DWORD dwHighDateTime;
  55. } FILETIME,*LPFILETIME;
  56. #endif
  57. #ifndef BEGIN_INTERFACE
  58. #define BEGIN_INTERFACE
  59. #endif
  60. #define MAPI_MODIFY ((ULONG) 0x00000001)
  61. #define MAPI_ACCESS_MODIFY ((ULONG) 0x00000001)
  62. #define MAPI_ACCESS_READ ((ULONG) 0x00000002)
  63. #define MAPI_ACCESS_DELETE ((ULONG) 0x00000004)
  64. #define MAPI_ACCESS_CREATE_HIERARCHY ((ULONG) 0x00000008)
  65. #define MAPI_ACCESS_CREATE_CONTENTS ((ULONG) 0x00000010)
  66. #define MAPI_ACCESS_CREATE_ASSOCIATED ((ULONG) 0x00000020)
  67. #define MAPI_UNICODE ((ULONG) 0x80000000)
  68. #if defined(UNICODE)
  69. #define fMapiUnicode MAPI_UNICODE
  70. #else
  71. #define fMapiUnicode 0
  72. #endif
  73. #define hrSuccess 0
  74. #ifndef MAPI_ORIG
  75. #define MAPI_ORIG 0
  76. #define MAPI_TO 1
  77. #define MAPI_CC 2
  78. #define MAPI_BCC 3
  79. #define MAPI_P1 0x10000000
  80. #define MAPI_SUBMITTED 0x80000000
  81. #endif
  82. #define MAPI_SHORTTERM 0x80
  83. #define MAPI_NOTRECIP 0x40
  84. #define MAPI_THISSESSION 0x20
  85. #define MAPI_NOW 0x10
  86. #define MAPI_NOTRESERVED 0x08
  87. #define MAPI_COMPOUND 0x80
  88. typedef struct {
  89. BYTE abFlags[4];
  90. BYTE ab[MAPI_DIM];
  91. } ENTRYID,*LPENTRYID;
  92. #define CbNewENTRYID(_cb) (offsetof(ENTRYID,ab) + (_cb))
  93. #define CbENTRYID(_cb) (offsetof(ENTRYID,ab) + (_cb))
  94. #define SizedENTRYID(_cb,_name) struct _ENTRYID_ ## _name { BYTE abFlags[4]; BYTE ab[_cb]; } _name
  95. typedef struct _MAPIUID {
  96. BYTE ab[16];
  97. } MAPIUID,*LPMAPIUID;
  98. #define IsEqualMAPIUID(lpuid1,lpuid2) (!memcmp(lpuid1,lpuid2,sizeof(MAPIUID)))
  99. #define MAPI_ONE_OFF_UID { 0x81,0x2b,0x1f,0xa4,0xbe,0xa3,0x10,0x19,0x9d,0x6e,0x00,0xdd,0x01,0x0f,0x54,0x02 }
  100. #define MAPI_ONE_OFF_UNICODE 0x8000
  101. #define MAPI_ONE_OFF_NO_RICH_INFO 0x0001
  102. #define MAPI_STORE ((ULONG) 0x00000001)
  103. #define MAPI_ADDRBOOK ((ULONG) 0x00000002)
  104. #define MAPI_FOLDER ((ULONG) 0x00000003)
  105. #define MAPI_ABCONT ((ULONG) 0x00000004)
  106. #define MAPI_MESSAGE ((ULONG) 0x00000005)
  107. #define MAPI_MAILUSER ((ULONG) 0x00000006)
  108. #define MAPI_ATTACH ((ULONG) 0x00000007)
  109. #define MAPI_DISTLIST ((ULONG) 0x00000008)
  110. #define MAPI_PROFSECT ((ULONG) 0x00000009)
  111. #define MAPI_STATUS ((ULONG) 0x0000000A)
  112. #define MAPI_SESSION ((ULONG) 0x0000000B)
  113. #define MAPI_FORMINFO ((ULONG) 0x0000000C)
  114. #ifndef cchProfileNameMax
  115. #define cchProfileNameMax 64
  116. #define cchProfilePassMax 64
  117. #endif
  118. #define MV_FLAG 0x1000
  119. #define PT_UNSPECIFIED ((ULONG) 0)
  120. #define PT_NULL ((ULONG) 1)
  121. #define PT_I2 ((ULONG) 2)
  122. #define PT_LONG ((ULONG) 3)
  123. #define PT_R4 ((ULONG) 4)
  124. #define PT_DOUBLE ((ULONG) 5)
  125. #define PT_CURRENCY ((ULONG) 6)
  126. #define PT_APPTIME ((ULONG) 7)
  127. #define PT_ERROR ((ULONG) 10)
  128. #define PT_BOOLEAN ((ULONG) 11)
  129. #define PT_OBJECT ((ULONG) 13)
  130. #define PT_I8 ((ULONG) 20)
  131. #define PT_STRING8 ((ULONG) 30)
  132. #define PT_UNICODE ((ULONG) 31)
  133. #define PT_SYSTIME ((ULONG) 64)
  134. #define PT_CLSID ((ULONG) 72)
  135. #define PT_BINARY ((ULONG) 258)
  136. #define PT_SHORT PT_I2
  137. #define PT_I4 PT_LONG
  138. #define PT_FLOAT PT_R4
  139. #define PT_R8 PT_DOUBLE
  140. #define PT_LONGLONG PT_I8
  141. #if defined(UNICODE)
  142. #define PT_TSTRING PT_UNICODE
  143. #define PT_MV_TSTRING (MV_FLAG|PT_UNICODE)
  144. #define LPSZ lpszW
  145. #define LPPSZ lppszW
  146. #define MVSZ MVszW
  147. #else
  148. #define PT_TSTRING PT_STRING8
  149. #define PT_MV_TSTRING (MV_FLAG|PT_STRING8)
  150. #define LPSZ lpszA
  151. #define LPPSZ lppszA
  152. #define MVSZ MVszA
  153. #endif
  154. #define PROP_TYPE_MASK ((ULONG)0x0000FFFF)
  155. #define PROP_TYPE(ulPropTag) (((ULONG)(ulPropTag))&PROP_TYPE_MASK)
  156. #define PROP_ID(ulPropTag) (((ULONG)(ulPropTag))>>16)
  157. #define PROP_TAG(ulPropType,ulPropID) ((((ULONG)(ulPropID))<<16)|((ULONG)(ulPropType)))
  158. #define PROP_ID_NULL 0
  159. #define PROP_ID_INVALID 0xFFFF
  160. #define PR_NULL PROP_TAG(PT_NULL,PROP_ID_NULL)
  161. #define CHANGE_PROP_TYPE(ulPropTag,ulPropType) (((ULONG)0xFFFF0000 & ulPropTag) | ulPropType)
  162. #define PT_MV_I2 (MV_FLAG|PT_I2)
  163. #define PT_MV_LONG (MV_FLAG|PT_LONG)
  164. #define PT_MV_R4 (MV_FLAG|PT_R4)
  165. #define PT_MV_DOUBLE (MV_FLAG|PT_DOUBLE)
  166. #define PT_MV_CURRENCY (MV_FLAG|PT_CURRENCY)
  167. #define PT_MV_APPTIME (MV_FLAG|PT_APPTIME)
  168. #define PT_MV_SYSTIME (MV_FLAG|PT_SYSTIME)
  169. #define PT_MV_STRING8 (MV_FLAG|PT_STRING8)
  170. #define PT_MV_BINARY (MV_FLAG|PT_BINARY)
  171. #define PT_MV_UNICODE (MV_FLAG|PT_UNICODE)
  172. #define PT_MV_CLSID (MV_FLAG|PT_CLSID)
  173. #define PT_MV_I8 (MV_FLAG|PT_I8)
  174. #define PT_MV_SHORT PT_MV_I2
  175. #define PT_MV_I4 PT_MV_LONG
  176. #define PT_MV_FLOAT PT_MV_R4
  177. #define PT_MV_R8 PT_MV_DOUBLE
  178. #define PT_MV_LONGLONG PT_MV_I8
  179. #define MV_INSTANCE 0x2000
  180. #define MVI_FLAG (MV_FLAG | MV_INSTANCE)
  181. #define MVI_PROP(tag) ((tag) | MVI_FLAG)
  182. typedef struct _SPropTagArray {
  183. ULONG cValues;
  184. ULONG aulPropTag[MAPI_DIM];
  185. } SPropTagArray,*LPSPropTagArray;
  186. #define CbNewSPropTagArray(_ctag) (offsetof(SPropTagArray,aulPropTag) + (_ctag)*sizeof(ULONG))
  187. #define CbSPropTagArray(_lparray) (offsetof(SPropTagArray,aulPropTag) + (UINT)((_lparray)->cValues)*sizeof(ULONG))
  188. #define SizedSPropTagArray(_ctag,_name) struct _SPropTagArray_ ## _name { ULONG cValues; ULONG aulPropTag[_ctag]; } _name
  189. typedef struct _SPropValue SPropValue;
  190. #ifndef _tagCY_DEFINED
  191. #define _tagCY_DEFINED
  192. #define _CY_DEFINED
  193. typedef union tagCY {
  194. struct {
  195. unsigned __LONG32 Lo;
  196. __LONG32 Hi;
  197. };
  198. LONGLONG int64;
  199. } CY;
  200. #endif
  201. typedef CY CURRENCY;
  202. typedef struct _SBinary {
  203. ULONG cb;
  204. LPBYTE lpb;
  205. } SBinary,*LPSBinary;
  206. typedef struct _SShortArray {
  207. ULONG cValues;
  208. short int *lpi;
  209. } SShortArray;
  210. typedef struct _SGuidArray {
  211. ULONG cValues;
  212. GUID *lpguid;
  213. } SGuidArray;
  214. typedef struct _SRealArray {
  215. ULONG cValues;
  216. float *lpflt;
  217. } SRealArray;
  218. typedef struct _SLongArray {
  219. ULONG cValues;
  220. LONG *lpl;
  221. } SLongArray;
  222. typedef struct _SLargeIntegerArray {
  223. ULONG cValues;
  224. LARGE_INTEGER *lpli;
  225. } SLargeIntegerArray;
  226. typedef struct _SDateTimeArray {
  227. ULONG cValues;
  228. FILETIME *lpft;
  229. } SDateTimeArray;
  230. typedef struct _SAppTimeArray {
  231. ULONG cValues;
  232. double *lpat;
  233. } SAppTimeArray;
  234. typedef struct _SCurrencyArray {
  235. ULONG cValues;
  236. CURRENCY *lpcur;
  237. } SCurrencyArray;
  238. typedef struct _SBinaryArray {
  239. ULONG cValues;
  240. SBinary *lpbin;
  241. } SBinaryArray;
  242. typedef struct _SDoubleArray {
  243. ULONG cValues;
  244. double *lpdbl;
  245. } SDoubleArray;
  246. typedef struct _SWStringArray {
  247. ULONG cValues;
  248. LPWSTR *lppszW;
  249. } SWStringArray;
  250. typedef struct _SLPSTRArray {
  251. ULONG cValues;
  252. LPSTR *lppszA;
  253. } SLPSTRArray;
  254. typedef union _PV {
  255. short int i;
  256. LONG l;
  257. ULONG ul;
  258. float flt;
  259. double dbl;
  260. unsigned short int b;
  261. CURRENCY cur;
  262. double at;
  263. FILETIME ft;
  264. LPSTR lpszA;
  265. SBinary bin;
  266. LPWSTR lpszW;
  267. LPGUID lpguid;
  268. LARGE_INTEGER li;
  269. SShortArray MVi;
  270. SLongArray MVl;
  271. SRealArray MVflt;
  272. SDoubleArray MVdbl;
  273. SCurrencyArray MVcur;
  274. SAppTimeArray MVat;
  275. SDateTimeArray MVft;
  276. SBinaryArray MVbin;
  277. SLPSTRArray MVszA;
  278. SWStringArray MVszW;
  279. SGuidArray MVguid;
  280. SLargeIntegerArray MVli;
  281. SCODE err;
  282. LONG x;
  283. } __UPV;
  284. typedef struct _SPropValue {
  285. ULONG ulPropTag;
  286. ULONG dwAlignPad;
  287. union _PV Value;
  288. } SPropValue,*LPSPropValue;
  289. typedef struct _SPropProblem {
  290. ULONG ulIndex;
  291. ULONG ulPropTag;
  292. SCODE scode;
  293. } SPropProblem,*LPSPropProblem;
  294. typedef struct _SPropProblemArray {
  295. ULONG cProblem;
  296. SPropProblem aProblem[MAPI_DIM];
  297. } SPropProblemArray,*LPSPropProblemArray;
  298. #define CbNewSPropProblemArray(_cprob) (offsetof(SPropProblemArray,aProblem) + (_cprob)*sizeof(SPropProblem))
  299. #define CbSPropProblemArray(_lparray) (offsetof(SPropProblemArray,aProblem) + (UINT) ((_lparray)->cProblem*sizeof(SPropProblem)))
  300. #define SizedSPropProblemArray(_cprob,_name) struct _SPropProblemArray_ ## _name { ULONG cProblem; SPropProblem aProblem[_cprob]; } _name
  301. typedef SBinaryArray ENTRYLIST,*LPENTRYLIST;
  302. typedef struct {
  303. ULONG cb;
  304. BYTE abEntry[MAPI_DIM];
  305. } FLATENTRY,*LPFLATENTRY;
  306. typedef struct {
  307. ULONG cEntries;
  308. ULONG cbEntries;
  309. BYTE abEntries[MAPI_DIM];
  310. } FLATENTRYLIST,*LPFLATENTRYLIST;
  311. typedef struct {
  312. ULONG cb;
  313. BYTE ab[MAPI_DIM];
  314. } MTSID,*LPMTSID;
  315. typedef struct {
  316. ULONG cMTSIDs;
  317. ULONG cbMTSIDs;
  318. BYTE abMTSIDs[MAPI_DIM];
  319. } FLATMTSIDLIST,*LPFLATMTSIDLIST;
  320. #define CbNewFLATENTRY(_cb) (offsetof(FLATENTRY,abEntry) + (_cb))
  321. #define CbFLATENTRY(_lpentry) (offsetof(FLATENTRY,abEntry) + (_lpentry)->cb)
  322. #define CbNewFLATENTRYLIST(_cb) (offsetof(FLATENTRYLIST,abEntries) + (_cb))
  323. #define CbFLATENTRYLIST(_lplist) (offsetof(FLATENTRYLIST,abEntries) + (_lplist)->cbEntries)
  324. #define CbNewMTSID(_cb) (offsetof(MTSID,ab) + (_cb))
  325. #define CbMTSID(_lpentry) (offsetof(MTSID,ab) + (_lpentry)->cb)
  326. #define CbNewFLATMTSIDLIST(_cb) (offsetof(FLATMTSIDLIST,abMTSIDs) + (_cb))
  327. #define CbFLATMTSIDLIST(_lplist) (offsetof(FLATMTSIDLIST,abMTSIDs) + (_lplist)->cbMTSIDs)
  328. typedef struct _ADRENTRY {
  329. ULONG ulReserved1;
  330. ULONG cValues;
  331. LPSPropValue rgPropVals;
  332. } ADRENTRY,*LPADRENTRY;
  333. typedef struct _ADRLIST {
  334. ULONG cEntries;
  335. ADRENTRY aEntries[MAPI_DIM];
  336. } ADRLIST,*LPADRLIST;
  337. #define CbNewADRLIST(_centries) (offsetof(ADRLIST,aEntries) + (_centries)*sizeof(ADRENTRY))
  338. #define CbADRLIST(_lpadrlist) (offsetof(ADRLIST,aEntries) + (UINT)(_lpadrlist)->cEntries*sizeof(ADRENTRY))
  339. #define SizedADRLIST(_centries,_name) struct _ADRLIST_ ## _name { ULONG cEntries; ADRENTRY aEntries[_centries]; } _name
  340. typedef struct _SRow {
  341. ULONG ulAdrEntryPad;
  342. ULONG cValues;
  343. LPSPropValue lpProps;
  344. } SRow,*LPSRow;
  345. typedef struct _SRowSet {
  346. ULONG cRows;
  347. SRow aRow[MAPI_DIM];
  348. } SRowSet,*LPSRowSet;
  349. #define CbNewSRowSet(_crow) (offsetof(SRowSet,aRow) + (_crow)*sizeof(SRow))
  350. #define CbSRowSet(_lprowset) (offsetof(SRowSet,aRow) + (UINT)((_lprowset)->cRows*sizeof(SRow)))
  351. #define SizedSRowSet(_crow,_name) struct _SRowSet_ ## _name { ULONG cRows; SRow aRow[_crow]; } _name
  352. typedef SCODE (WINAPI ALLOCATEBUFFER)(ULONG cbSize,LPVOID *lppBuffer);
  353. typedef SCODE (WINAPI ALLOCATEMORE)(ULONG cbSize,LPVOID lpObject,LPVOID *lppBuffer);
  354. typedef ULONG (WINAPI FREEBUFFER)(LPVOID lpBuffer);
  355. typedef ALLOCATEBUFFER *LPALLOCATEBUFFER;
  356. typedef ALLOCATEMORE *LPALLOCATEMORE;
  357. typedef FREEBUFFER *LPFREEBUFFER;
  358. #if defined(MAPI_IF) && (!defined(__cplusplus) || defined(CINTERFACE))
  359. #define DECLARE_MAPI_INTERFACE(iface) typedef struct iface##Vtbl iface##Vtbl,*iface; struct iface##Vtbl
  360. #define DECLARE_MAPI_INTERFACE_(iface,baseiface) DECLARE_MAPI_INTERFACE(iface)
  361. #define DECLARE_MAPI_INTERFACE_PTR(iface,piface) typedef struct iface##Vtbl iface##Vtbl,*iface,**piface;
  362. #else
  363. #define DECLARE_MAPI_INTERFACE(iface) DECLARE_INTERFACE(iface)
  364. #define DECLARE_MAPI_INTERFACE_(iface,baseiface) DECLARE_INTERFACE_(iface,baseiface)
  365. #ifdef __cplusplus
  366. #define DECLARE_MAPI_INTERFACE_PTR(iface,piface) struct iface; typedef iface *piface
  367. #else
  368. #define DECLARE_MAPI_INTERFACE_PTR(iface,piface) typedef struct iface iface,*piface
  369. #endif
  370. #endif
  371. #define MAPIMETHOD(method) MAPIMETHOD_(HRESULT,method)
  372. #define MAPIMETHOD_(type,method) STDMETHOD_(type,method)
  373. #define MAPIMETHOD_DECLARE(type,method,prefix) STDMETHODIMP_(type) prefix##method
  374. #define MAPIMETHOD_TYPEDEF(type,method,prefix) typedef type (WINAPI prefix##method##_METHOD)
  375. #define MAPI_IUNKNOWN_METHODS(IPURE) MAPIMETHOD(QueryInterface) (THIS_ REFIID riid,LPVOID *ppvObj) IPURE; MAPIMETHOD_(ULONG,AddRef) (THIS) IPURE; MAPIMETHOD_(ULONG,Release) (THIS) IPURE;
  376. #undef IMPL
  377. #define IMPL
  378. typedef const IID *LPCIID;
  379. DECLARE_MAPI_INTERFACE_PTR(IMsgStore,LPMDB);
  380. DECLARE_MAPI_INTERFACE_PTR(IMAPIFolder,LPMAPIFOLDER);
  381. DECLARE_MAPI_INTERFACE_PTR(IMessage,LPMESSAGE);
  382. DECLARE_MAPI_INTERFACE_PTR(IAttach,LPATTACH);
  383. DECLARE_MAPI_INTERFACE_PTR(IAddrBook,LPADRBOOK);
  384. DECLARE_MAPI_INTERFACE_PTR(IABContainer,LPABCONT);
  385. DECLARE_MAPI_INTERFACE_PTR(IMailUser,LPMAILUSER);
  386. DECLARE_MAPI_INTERFACE_PTR(IDistList,LPDISTLIST);
  387. DECLARE_MAPI_INTERFACE_PTR(IMAPIStatus,LPMAPISTATUS);
  388. DECLARE_MAPI_INTERFACE_PTR(IMAPITable,LPMAPITABLE);
  389. DECLARE_MAPI_INTERFACE_PTR(IProfSect,LPPROFSECT);
  390. DECLARE_MAPI_INTERFACE_PTR(IMAPIProp,LPMAPIPROP);
  391. DECLARE_MAPI_INTERFACE_PTR(IMAPIContainer,LPMAPICONTAINER);
  392. DECLARE_MAPI_INTERFACE_PTR(IMAPIAdviseSink,LPMAPIADVISESINK);
  393. DECLARE_MAPI_INTERFACE_PTR(IMAPIProgress,LPMAPIPROGRESS);
  394. DECLARE_MAPI_INTERFACE_PTR(IProviderAdmin,LPPROVIDERADMIN);
  395. typedef struct _MAPIERROR {
  396. ULONG ulVersion;
  397. LPTSTR lpszError;
  398. LPTSTR lpszComponent;
  399. ULONG ulLowLevelError;
  400. ULONG ulContext;
  401. } MAPIERROR,*LPMAPIERROR;
  402. #define fnevCriticalError ((ULONG) 0x00000001)
  403. #define fnevNewMail ((ULONG) 0x00000002)
  404. #define fnevObjectCreated ((ULONG) 0x00000004)
  405. #define fnevObjectDeleted ((ULONG) 0x00000008)
  406. #define fnevObjectModified ((ULONG) 0x00000010)
  407. #define fnevObjectMoved ((ULONG) 0x00000020)
  408. #define fnevObjectCopied ((ULONG) 0x00000040)
  409. #define fnevSearchComplete ((ULONG) 0x00000080)
  410. #define fnevTableModified ((ULONG) 0x00000100)
  411. #define fnevStatusObjectModified ((ULONG) 0x00000200)
  412. #define fnevReservedForMapi ((ULONG) 0x40000000)
  413. #define fnevExtended ((ULONG) 0x80000000)
  414. #define TABLE_CHANGED 1
  415. #define TABLE_ERROR 2
  416. #define TABLE_ROW_ADDED 3
  417. #define TABLE_ROW_DELETED 4
  418. #define TABLE_ROW_MODIFIED 5
  419. #define TABLE_SORT_DONE 6
  420. #define TABLE_RESTRICT_DONE 7
  421. #define TABLE_SETCOL_DONE 8
  422. #define TABLE_RELOAD 9
  423. typedef struct _ERROR_NOTIFICATION {
  424. ULONG cbEntryID;
  425. LPENTRYID lpEntryID;
  426. SCODE scode;
  427. ULONG ulFlags;
  428. LPMAPIERROR lpMAPIError;
  429. } ERROR_NOTIFICATION;
  430. typedef struct _NEWMAIL_NOTIFICATION {
  431. ULONG cbEntryID;
  432. LPENTRYID lpEntryID;
  433. ULONG cbParentID;
  434. LPENTRYID lpParentID;
  435. ULONG ulFlags;
  436. LPTSTR lpszMessageClass;
  437. ULONG ulMessageFlags;
  438. } NEWMAIL_NOTIFICATION;
  439. typedef struct _OBJECT_NOTIFICATION {
  440. ULONG cbEntryID;
  441. LPENTRYID lpEntryID;
  442. ULONG ulObjType;
  443. ULONG cbParentID;
  444. LPENTRYID lpParentID;
  445. ULONG cbOldID;
  446. LPENTRYID lpOldID;
  447. ULONG cbOldParentID;
  448. LPENTRYID lpOldParentID;
  449. LPSPropTagArray lpPropTagArray;
  450. } OBJECT_NOTIFICATION;
  451. typedef struct _TABLE_NOTIFICATION {
  452. ULONG ulTableEvent;
  453. HRESULT hResult;
  454. SPropValue propIndex;
  455. SPropValue propPrior;
  456. SRow row;
  457. ULONG ulPad;
  458. } TABLE_NOTIFICATION;
  459. typedef struct _EXTENDED_NOTIFICATION {
  460. ULONG ulEvent;
  461. ULONG cb;
  462. LPBYTE pbEventParameters;
  463. } EXTENDED_NOTIFICATION;
  464. typedef struct {
  465. ULONG cbEntryID;
  466. LPENTRYID lpEntryID;
  467. ULONG cValues;
  468. LPSPropValue lpPropVals;
  469. } STATUS_OBJECT_NOTIFICATION;
  470. typedef struct _NOTIFICATION {
  471. ULONG ulEventType;
  472. ULONG ulAlignPad;
  473. union {
  474. ERROR_NOTIFICATION err;
  475. NEWMAIL_NOTIFICATION newmail;
  476. OBJECT_NOTIFICATION obj;
  477. TABLE_NOTIFICATION tab;
  478. EXTENDED_NOTIFICATION ext;
  479. STATUS_OBJECT_NOTIFICATION statobj;
  480. } info;
  481. } NOTIFICATION,*LPNOTIFICATION;
  482. #define MAPI_IMAPIADVISESINK_METHODS(IPURE) MAPIMETHOD_(ULONG,OnNotify) (THIS_ ULONG cNotif,LPNOTIFICATION lpNotifications) IPURE;
  483. #undef INTERFACE
  484. #define INTERFACE IMAPIAdviseSink
  485. DECLARE_MAPI_INTERFACE_(IMAPIAdviseSink,IUnknown) {
  486. BEGIN_INTERFACE
  487. MAPI_IUNKNOWN_METHODS(PURE)
  488. MAPI_IMAPIADVISESINK_METHODS(PURE)
  489. };
  490. typedef __LONG32 (WINAPI NOTIFCALLBACK) (LPVOID lpvContext,ULONG cNotification,LPNOTIFICATION lpNotifications);
  491. typedef NOTIFCALLBACK *LPNOTIFCALLBACK;
  492. #define szMAPINotificationMsg "MAPI Notify window message"
  493. #define MAPI_TOP_LEVEL ((ULONG) 0x00000001)
  494. #define MAPI_IMAPIPROGRESS_METHODS(IPURE) MAPIMETHOD(Progress) (THIS_ ULONG ulValue,ULONG ulCount,ULONG ulTotal) IPURE; MAPIMETHOD(GetFlags) (THIS_ ULONG *lpulFlags) IPURE; MAPIMETHOD(GetMax) (THIS_ ULONG *lpulMax) IPURE; MAPIMETHOD(GetMin) (THIS_ ULONG *lpulMin) IPURE; MAPIMETHOD(SetLimits) (THIS_ LPULONG lpulMin,LPULONG lpulMax,LPULONG lpulFlags) IPURE;
  495. #undef INTERFACE
  496. #define INTERFACE IMAPIProgress
  497. DECLARE_MAPI_INTERFACE_(IMAPIProgress,IUnknown) {
  498. BEGIN_INTERFACE
  499. MAPI_IUNKNOWN_METHODS(PURE)
  500. MAPI_IMAPIPROGRESS_METHODS(PURE)
  501. };
  502. #define MAPI_ERROR_VERSION __MSABI_LONG(0x00000000)
  503. #define KEEP_OPEN_READONLY ((ULONG) 0x00000001)
  504. #define KEEP_OPEN_READWRITE ((ULONG) 0x00000002)
  505. #define FORCE_SAVE ((ULONG) 0x00000004)
  506. #define MAPI_CREATE ((ULONG) 0x00000002)
  507. #define STREAM_APPEND ((ULONG) 0x00000004)
  508. #define MAPI_MOVE ((ULONG) 0x00000001)
  509. #define MAPI_NOREPLACE ((ULONG) 0x00000002)
  510. #define MAPI_DECLINE_OK ((ULONG) 0x00000004)
  511. #ifndef MAPI_DIALOG
  512. #define MAPI_DIALOG ((ULONG) 0x00000008)
  513. #endif
  514. #ifndef MAPI_USE_DEFAULT
  515. #define MAPI_USE_DEFAULT 0x00000040
  516. #endif
  517. #define MAPI_NO_STRINGS ((ULONG) 0x00000001)
  518. #define MAPI_NO_IDS ((ULONG) 0x00000002)
  519. #define MNID_ID 0
  520. #define MNID_STRING 1
  521. typedef struct _MAPINAMEID {
  522. LPGUID lpguid;
  523. ULONG ulKind;
  524. union {
  525. LONG lID;
  526. LPWSTR lpwstrName;
  527. } Kind;
  528. } MAPINAMEID,*LPMAPINAMEID;
  529. #define MAPI_IMAPIPROP_METHODS(IPURE) MAPIMETHOD(GetLastError) (THIS_ HRESULT hResult,ULONG ulFlags,LPMAPIERROR *lppMAPIError) IPURE; MAPIMETHOD(SaveChanges) (THIS_ ULONG ulFlags) IPURE; MAPIMETHOD(GetProps) (THIS_ LPSPropTagArray lpPropTagArray,ULONG ulFlags,ULONG *lpcValues,LPSPropValue *lppPropArray) IPURE; MAPIMETHOD(GetPropList) (THIS_ ULONG ulFlags,LPSPropTagArray *lppPropTagArray) IPURE; MAPIMETHOD(OpenProperty) (THIS_ ULONG ulPropTag,LPCIID lpiid,ULONG ulInterfaceOptions,ULONG ulFlags,LPUNKNOWN *lppUnk) IPURE; MAPIMETHOD(SetProps) (THIS_ ULONG cValues,LPSPropValue lpPropArray,LPSPropProblemArray *lppProblems) IPURE; MAPIMETHOD(DeleteProps) (THIS_ LPSPropTagArray lpPropTagArray,LPSPropProblemArray *lppProblems) IPURE; MAPIMETHOD(CopyTo) (THIS_ ULONG ciidExclude,LPCIID rgiidExclude,LPSPropTagArray lpExcludeProps,ULONG ulUIParam,LPMAPIPROGRESS lpProgress,LPCIID lpInterface,LPVOID lpDestObj,ULONG ulFlags,LPSPropProblemArray *lppProblems) IPURE; MAPIMETHOD(CopyProps) (THIS_ LPSPropTagArray lpIncludeProps,ULONG ulUIParam,LPMAPIPROGRESS lpProgress,LPCIID lpInterface,LPVOID lpDestObj,ULONG ulFlags,LPSPropProblemArray *lppProblems) IPURE; MAPIMETHOD(GetNamesFromIDs) (THIS_ LPSPropTagArray *lppPropTags,LPGUID lpPropSetGuid,ULONG ulFlags,ULONG *lpcPropNames,LPMAPINAMEID **lpppPropNames) IPURE; MAPIMETHOD(GetIDsFromNames) (THIS_ ULONG cPropNames,LPMAPINAMEID *lppPropNames,ULONG ulFlags,LPSPropTagArray *lppPropTags) IPURE;
  530. #undef INTERFACE
  531. #define INTERFACE IMAPIProp
  532. DECLARE_MAPI_INTERFACE_(IMAPIProp,IUnknown) {
  533. BEGIN_INTERFACE
  534. MAPI_IUNKNOWN_METHODS(PURE)
  535. MAPI_IMAPIPROP_METHODS(PURE)
  536. };
  537. #define TBLSTAT_COMPLETE ((ULONG) 0)
  538. #define TBLSTAT_QCHANGED ((ULONG) 7)
  539. #define TBLSTAT_SORTING ((ULONG) 9)
  540. #define TBLSTAT_SORT_ERROR ((ULONG) 10)
  541. #define TBLSTAT_SETTING_COLS ((ULONG) 11)
  542. #define TBLSTAT_SETCOL_ERROR ((ULONG) 13)
  543. #define TBLSTAT_RESTRICTING ((ULONG) 14)
  544. #define TBLSTAT_RESTRICT_ERROR ((ULONG) 15)
  545. #define TBLTYPE_SNAPSHOT ((ULONG) 0)
  546. #define TBLTYPE_KEYSET ((ULONG) 1)
  547. #define TBLTYPE_DYNAMIC ((ULONG) 2)
  548. #define TABLE_SORT_ASCEND ((ULONG) 0x00000000)
  549. #define TABLE_SORT_DESCEND ((ULONG) 0x00000001)
  550. #define TABLE_SORT_COMBINE ((ULONG) 0x00000002)
  551. typedef struct _SSortOrder {
  552. ULONG ulPropTag;
  553. ULONG ulOrder;
  554. } SSortOrder,*LPSSortOrder;
  555. typedef struct _SSortOrderSet {
  556. ULONG cSorts;
  557. ULONG cCategories;
  558. ULONG cExpanded;
  559. SSortOrder aSort[MAPI_DIM];
  560. } SSortOrderSet,*LPSSortOrderSet;
  561. #define CbNewSSortOrderSet(_csort) (offsetof(SSortOrderSet,aSort) + (_csort)*sizeof(SSortOrder))
  562. #define CbSSortOrderSet(_lpset) (offsetof(SSortOrderSet,aSort) + (UINT)((_lpset)->cSorts*sizeof(SSortOrder)))
  563. #define SizedSSortOrderSet(_csort,_name) struct _SSortOrderSet_ ## _name { ULONG cSorts; ULONG cCategories; ULONG cExpanded; SSortOrder aSort[_csort]; } _name
  564. typedef ULONG BOOKMARK;
  565. #define BOOKMARK_BEGINNING ((BOOKMARK) 0)
  566. #define BOOKMARK_CURRENT ((BOOKMARK) 1)
  567. #define BOOKMARK_END ((BOOKMARK) 2)
  568. #define FL_FULLSTRING ((ULONG) 0x00000000)
  569. #define FL_SUBSTRING ((ULONG) 0x00000001)
  570. #define FL_PREFIX ((ULONG) 0x00000002)
  571. #define FL_IGNORECASE ((ULONG) 0x00010000)
  572. #define FL_IGNORENONSPACE ((ULONG) 0x00020000)
  573. #define FL_LOOSE ((ULONG) 0x00040000)
  574. typedef struct _SRestriction *LPSRestriction;
  575. #define RES_AND ((ULONG) 0x00000000)
  576. #define RES_OR ((ULONG) 0x00000001)
  577. #define RES_NOT ((ULONG) 0x00000002)
  578. #define RES_CONTENT ((ULONG) 0x00000003)
  579. #define RES_PROPERTY ((ULONG) 0x00000004)
  580. #define RES_COMPAREPROPS ((ULONG) 0x00000005)
  581. #define RES_BITMASK ((ULONG) 0x00000006)
  582. #define RES_SIZE ((ULONG) 0x00000007)
  583. #define RES_EXIST ((ULONG) 0x00000008)
  584. #define RES_SUBRESTRICTION ((ULONG) 0x00000009)
  585. #define RES_COMMENT ((ULONG) 0x0000000A)
  586. #define RELOP_LT ((ULONG) 0)
  587. #define RELOP_LE ((ULONG) 1)
  588. #define RELOP_GT ((ULONG) 2)
  589. #define RELOP_GE ((ULONG) 3)
  590. #define RELOP_EQ ((ULONG) 4)
  591. #define RELOP_NE ((ULONG) 5)
  592. #define RELOP_RE ((ULONG) 6)
  593. #define BMR_EQZ ((ULONG) 0)
  594. #define BMR_NEZ ((ULONG) 1)
  595. typedef struct _SAndRestriction {
  596. ULONG cRes;
  597. LPSRestriction lpRes;
  598. } SAndRestriction;
  599. typedef struct _SOrRestriction {
  600. ULONG cRes;
  601. LPSRestriction lpRes;
  602. } SOrRestriction;
  603. typedef struct _SNotRestriction {
  604. ULONG ulReserved;
  605. LPSRestriction lpRes;
  606. } SNotRestriction;
  607. typedef struct _SContentRestriction {
  608. ULONG ulFuzzyLevel;
  609. ULONG ulPropTag;
  610. LPSPropValue lpProp;
  611. } SContentRestriction;
  612. typedef struct _SBitMaskRestriction {
  613. ULONG relBMR;
  614. ULONG ulPropTag;
  615. ULONG ulMask;
  616. } SBitMaskRestriction;
  617. typedef struct _SPropertyRestriction {
  618. ULONG relop;
  619. ULONG ulPropTag;
  620. LPSPropValue lpProp;
  621. } SPropertyRestriction;
  622. typedef struct _SComparePropsRestriction {
  623. ULONG relop;
  624. ULONG ulPropTag1;
  625. ULONG ulPropTag2;
  626. } SComparePropsRestriction;
  627. typedef struct _SSizeRestriction {
  628. ULONG relop;
  629. ULONG ulPropTag;
  630. ULONG cb;
  631. } SSizeRestriction;
  632. typedef struct _SExistRestriction {
  633. ULONG ulReserved1;
  634. ULONG ulPropTag;
  635. ULONG ulReserved2;
  636. } SExistRestriction;
  637. typedef struct _SSubRestriction {
  638. ULONG ulSubObject;
  639. LPSRestriction lpRes;
  640. } SSubRestriction;
  641. typedef struct _SCommentRestriction {
  642. ULONG cValues;
  643. LPSRestriction lpRes;
  644. LPSPropValue lpProp;
  645. } SCommentRestriction;
  646. typedef struct _SRestriction {
  647. ULONG rt;
  648. union {
  649. SComparePropsRestriction resCompareProps;
  650. SAndRestriction resAnd;
  651. SOrRestriction resOr;
  652. SNotRestriction resNot;
  653. SContentRestriction resContent;
  654. SPropertyRestriction resProperty;
  655. SBitMaskRestriction resBitMask;
  656. SSizeRestriction resSize;
  657. SExistRestriction resExist;
  658. SSubRestriction resSub;
  659. SCommentRestriction resComment;
  660. } res;
  661. } SRestriction;
  662. #define TBL_ALL_COLUMNS ((ULONG) 0x00000001)
  663. #define TBL_LEAF_ROW ((ULONG) 1)
  664. #define TBL_EMPTY_CATEGORY ((ULONG) 2)
  665. #define TBL_EXPANDED_CATEGORY ((ULONG) 3)
  666. #define TBL_COLLAPSED_CATEGORY ((ULONG) 4)
  667. #define TBL_NOWAIT ((ULONG) 0x00000001)
  668. #define TBL_ASYNC ((ULONG) 0x00000001)
  669. #define TBL_BATCH ((ULONG) 0x00000002)
  670. #define DIR_BACKWARD ((ULONG) 0x00000001)
  671. #define TBL_NOADVANCE ((ULONG) 0x00000001)
  672. #define MAPI_IMAPITABLE_METHODS(IPURE) MAPIMETHOD(GetLastError) (THIS_ HRESULT hResult,ULONG ulFlags,LPMAPIERROR *lppMAPIError) IPURE; MAPIMETHOD(Advise) (THIS_ ULONG ulEventMask,LPMAPIADVISESINK lpAdviseSink,ULONG *lpulConnection) IPURE; MAPIMETHOD(Unadvise) (THIS_ ULONG ulConnection) IPURE; MAPIMETHOD(GetStatus) (THIS_ ULONG *lpulTableStatus,ULONG *lpulTableType) IPURE; MAPIMETHOD(SetColumns) (THIS_ LPSPropTagArray lpPropTagArray,ULONG ulFlags) IPURE; MAPIMETHOD(QueryColumns) (THIS_ ULONG ulFlags,LPSPropTagArray *lpPropTagArray) IPURE; MAPIMETHOD(GetRowCount) (THIS_ ULONG ulFlags,ULONG *lpulCount) IPURE; MAPIMETHOD(SeekRow) (THIS_ BOOKMARK bkOrigin,LONG lRowCount,LONG *lplRowsSought) IPURE; MAPIMETHOD(SeekRowApprox) (THIS_ ULONG ulNumerator,ULONG ulDenominator) IPURE; MAPIMETHOD(QueryPosition) (THIS_ ULONG *lpulRow,ULONG *lpulNumerator,ULONG *lpulDenominator) IPURE; MAPIMETHOD(FindRow) (THIS_ LPSRestriction lpRestriction,BOOKMARK bkOrigin,ULONG ulFlags) IPURE; MAPIMETHOD(Restrict) (THIS_ LPSRestriction lpRestriction,ULONG ulFlags) IPURE; MAPIMETHOD(CreateBookmark) (THIS_ BOOKMARK *lpbkPosition) IPURE; MAPIMETHOD(FreeBookmark) (THIS_ BOOKMARK bkPosition) IPURE; MAPIMETHOD(SortTable) (THIS_ LPSSortOrderSet lpSortCriteria,ULONG ulFlags) IPURE; MAPIMETHOD(QuerySortOrder) (THIS_ LPSSortOrderSet *lppSortCriteria) IPURE; MAPIMETHOD(QueryRows) (THIS_ LONG lRowCount,ULONG ulFlags,LPSRowSet *lppRows) IPURE; MAPIMETHOD(Abort) (THIS) IPURE; MAPIMETHOD(ExpandRow) (THIS_ ULONG cbInstanceKey,LPBYTE pbInstanceKey,ULONG ulRowCount,ULONG ulFlags,LPSRowSet *lppRows,ULONG *lpulMoreRows) IPURE; MAPIMETHOD(CollapseRow) (THIS_ ULONG cbInstanceKey,LPBYTE pbInstanceKey,ULONG ulFlags,ULONG *lpulRowCount) IPURE; MAPIMETHOD(WaitForCompletion) (THIS_ ULONG ulFlags,ULONG ulTimeout,ULONG *lpulTableStatus) IPURE; MAPIMETHOD(GetCollapseState) (THIS_ ULONG ulFlags,ULONG cbInstanceKey,LPBYTE lpbInstanceKey,ULONG *lpcbCollapseState,LPBYTE *lppbCollapseState) IPURE; MAPIMETHOD(SetCollapseState) (THIS_ ULONG ulFlags,ULONG cbCollapseState,LPBYTE pbCollapseState,BOOKMARK *lpbkLocation) IPURE;
  673. #undef INTERFACE
  674. #define INTERFACE IMAPITable
  675. DECLARE_MAPI_INTERFACE_(IMAPITable,IUnknown) {
  676. BEGIN_INTERFACE
  677. MAPI_IUNKNOWN_METHODS(PURE)
  678. MAPI_IMAPITABLE_METHODS(PURE)
  679. };
  680. #define PS_PROFILE_PROPERTIES_INIT { 0x98,0x15,0xAC,0x08,0xAA,0xB0,0x10,0x1A,0x8C,0x93,0x08,0x00,0x2B,0x2A,0x56,0xC2 }
  681. #define MAPI_IPROFSECT_METHODS(IPURE)
  682. #undef INTERFACE
  683. #define INTERFACE IProfSect
  684. DECLARE_MAPI_INTERFACE_(IProfSect,IMAPIProp) {
  685. BEGIN_INTERFACE
  686. MAPI_IUNKNOWN_METHODS(PURE)
  687. MAPI_IMAPIPROP_METHODS(PURE)
  688. MAPI_IPROFSECT_METHODS(PURE)
  689. };
  690. #define MAPI_STORE_PROVIDER ((ULONG) 33)
  691. #define MAPI_AB ((ULONG) 34)
  692. #define MAPI_AB_PROVIDER ((ULONG) 35)
  693. #define MAPI_TRANSPORT_PROVIDER ((ULONG) 36)
  694. #define MAPI_SPOOLER ((ULONG) 37)
  695. #define MAPI_PROFILE_PROVIDER ((ULONG) 38)
  696. #define MAPI_SUBSYSTEM ((ULONG) 39)
  697. #define MAPI_HOOK_PROVIDER ((ULONG) 40)
  698. #define STATUS_VALIDATE_STATE ((ULONG) 0x00000001)
  699. #define STATUS_SETTINGS_DIALOG ((ULONG) 0x00000002)
  700. #define STATUS_CHANGE_PASSWORD ((ULONG) 0x00000004)
  701. #define STATUS_FLUSH_QUEUES ((ULONG) 0x00000008)
  702. #define STATUS_DEFAULT_OUTBOUND ((ULONG) 0x00000001)
  703. #define STATUS_DEFAULT_STORE ((ULONG) 0x00000002)
  704. #define STATUS_PRIMARY_IDENTITY ((ULONG) 0x00000004)
  705. #define STATUS_SIMPLE_STORE ((ULONG) 0x00000008)
  706. #define STATUS_XP_PREFER_LAST ((ULONG) 0x00000010)
  707. #define STATUS_NO_PRIMARY_IDENTITY ((ULONG) 0x00000020)
  708. #define STATUS_NO_DEFAULT_STORE ((ULONG) 0x00000040)
  709. #define STATUS_TEMP_SECTION ((ULONG) 0x00000080)
  710. #define STATUS_OWN_STORE ((ULONG) 0x00000100)
  711. #define STATUS_NEED_IPM_TREE ((ULONG) 0x00000800)
  712. #define STATUS_PRIMARY_STORE ((ULONG) 0x00001000)
  713. #define STATUS_SECONDARY_STORE ((ULONG) 0x00002000)
  714. #define STATUS_AVAILABLE ((ULONG) 0x00000001)
  715. #define STATUS_OFFLINE ((ULONG) 0x00000002)
  716. #define STATUS_FAILURE ((ULONG) 0x00000004)
  717. #define STATUS_INBOUND_ENABLED ((ULONG) 0x00010000)
  718. #define STATUS_INBOUND_ACTIVE ((ULONG) 0x00020000)
  719. #define STATUS_INBOUND_FLUSH ((ULONG) 0x00040000)
  720. #define STATUS_OUTBOUND_ENABLED ((ULONG) 0x00100000)
  721. #define STATUS_OUTBOUND_ACTIVE ((ULONG) 0x00200000)
  722. #define STATUS_OUTBOUND_FLUSH ((ULONG) 0x00400000)
  723. #define STATUS_REMOTE_ACCESS ((ULONG) 0x00800000)
  724. #define SUPPRESS_UI ((ULONG) 0x00000001)
  725. #define REFRESH_XP_HEADER_CACHE ((ULONG) 0x00010000)
  726. #define PROCESS_XP_HEADER_CACHE ((ULONG) 0x00020000)
  727. #define FORCE_XP_CONNECT ((ULONG) 0x00040000)
  728. #define FORCE_XP_DISCONNECT ((ULONG) 0x00080000)
  729. #define CONFIG_CHANGED ((ULONG) 0x00100000)
  730. #define ABORT_XP_HEADER_OPERATION ((ULONG) 0x00200000)
  731. #define SHOW_XP_SESSION_UI ((ULONG) 0x00400000)
  732. #define UI_READONLY ((ULONG) 0x00000001)
  733. #define FLUSH_UPLOAD ((ULONG) 0x00000002)
  734. #define FLUSH_DOWNLOAD ((ULONG) 0x00000004)
  735. #define FLUSH_FORCE ((ULONG) 0x00000008)
  736. #define FLUSH_NO_UI ((ULONG) 0x00000010)
  737. #define FLUSH_ASYNC_OK ((ULONG) 0x00000020)
  738. #define MAPI_IMAPISTATUS_METHODS(IPURE) MAPIMETHOD(ValidateState) (THIS_ ULONG ulUIParam,ULONG ulFlags) IPURE; MAPIMETHOD(SettingsDialog) (THIS_ ULONG ulUIParam,ULONG ulFlags) IPURE; MAPIMETHOD(ChangePassword) (THIS_ LPTSTR lpOldPass,LPTSTR lpNewPass,ULONG ulFlags) IPURE; MAPIMETHOD(FlushQueues) (THIS_ ULONG ulUIParam,ULONG cbTargetTransport,LPENTRYID lpTargetTransport,ULONG ulFlags) IPURE;
  739. #undef INTERFACE
  740. #define INTERFACE IMAPIStatus
  741. DECLARE_MAPI_INTERFACE_(IMAPIStatus,IMAPIProp) {
  742. BEGIN_INTERFACE
  743. MAPI_IUNKNOWN_METHODS(PURE)
  744. MAPI_IMAPIPROP_METHODS(PURE)
  745. MAPI_IMAPISTATUS_METHODS(PURE)
  746. };
  747. #define MAPI_BEST_ACCESS ((ULONG) 0x00000010)
  748. #define CONVENIENT_DEPTH ((ULONG) 0x00000001)
  749. #define SEARCH_RUNNING ((ULONG) 0x00000001)
  750. #define SEARCH_REBUILD ((ULONG) 0x00000002)
  751. #define SEARCH_RECURSIVE ((ULONG) 0x00000004)
  752. #define SEARCH_FOREGROUND ((ULONG) 0x00000008)
  753. #define STOP_SEARCH ((ULONG) 0x00000001)
  754. #define RESTART_SEARCH ((ULONG) 0x00000002)
  755. #define RECURSIVE_SEARCH ((ULONG) 0x00000004)
  756. #define SHALLOW_SEARCH ((ULONG) 0x00000008)
  757. #define FOREGROUND_SEARCH ((ULONG) 0x00000010)
  758. #define BACKGROUND_SEARCH ((ULONG) 0x00000020)
  759. #define MAPI_IMAPICONTAINER_METHODS(IPURE) MAPIMETHOD(GetContentsTable) (THIS_ ULONG ulFlags,LPMAPITABLE *lppTable) IPURE; MAPIMETHOD(GetHierarchyTable) (THIS_ ULONG ulFlags,LPMAPITABLE *lppTable) IPURE; MAPIMETHOD(OpenEntry) (THIS_ ULONG cbEntryID,LPENTRYID lpEntryID,LPCIID lpInterface,ULONG ulFlags,ULONG *lpulObjType,LPUNKNOWN *lppUnk) IPURE; MAPIMETHOD(SetSearchCriteria) (THIS_ LPSRestriction lpRestriction,LPENTRYLIST lpContainerList,ULONG ulSearchFlags) IPURE; MAPIMETHOD(GetSearchCriteria) (THIS_ ULONG ulFlags,LPSRestriction *lppRestriction,LPENTRYLIST *lppContainerList,ULONG *lpulSearchState)IPURE;
  760. #undef INTERFACE
  761. #define INTERFACE IMAPIContainer
  762. DECLARE_MAPI_INTERFACE_(IMAPIContainer,IMAPIProp) {
  763. BEGIN_INTERFACE
  764. MAPI_IUNKNOWN_METHODS(PURE)
  765. MAPI_IMAPIPROP_METHODS(PURE)
  766. MAPI_IMAPICONTAINER_METHODS(PURE)
  767. };
  768. typedef struct _flaglist {
  769. ULONG cFlags;
  770. ULONG ulFlag[MAPI_DIM];
  771. } FlagList,*LPFlagList;
  772. #define AB_RECIPIENTS ((ULONG) 0x00000001)
  773. #define AB_SUBCONTAINERS ((ULONG) 0x00000002)
  774. #define AB_MODIFIABLE ((ULONG) 0x00000004)
  775. #define AB_UNMODIFIABLE ((ULONG) 0x00000008)
  776. #define AB_FIND_ON_OPEN ((ULONG) 0x00000010)
  777. #define AB_NOT_DEFAULT ((ULONG) 0x00000020)
  778. #define CREATE_CHECK_DUP_STRICT ((ULONG) 0x00000001)
  779. #define CREATE_CHECK_DUP_LOOSE ((ULONG) 0x00000002)
  780. #define CREATE_REPLACE ((ULONG) 0x00000004)
  781. #define MAPI_UNRESOLVED ((ULONG) 0x00000000)
  782. #define MAPI_AMBIGUOUS ((ULONG) 0x00000001)
  783. #define MAPI_RESOLVED ((ULONG) 0x00000002)
  784. #define MAPI_IABCONTAINER_METHODS(IPURE) MAPIMETHOD(CreateEntry) (THIS_ ULONG cbEntryID,LPENTRYID lpEntryID,ULONG ulCreateFlags,LPMAPIPROP *lppMAPIPropEntry) IPURE; MAPIMETHOD(CopyEntries) (THIS_ LPENTRYLIST lpEntries,ULONG ulUIParam,LPMAPIPROGRESS lpProgress,ULONG ulFlags) IPURE; MAPIMETHOD(DeleteEntries) (THIS_ LPENTRYLIST lpEntries,ULONG ulFlags) IPURE; MAPIMETHOD(ResolveNames) (THIS_ LPSPropTagArray lpPropTagArray,ULONG ulFlags,LPADRLIST lpAdrList,LPFlagList lpFlagList) IPURE;
  785. #undef INTERFACE
  786. #define INTERFACE IABContainer
  787. DECLARE_MAPI_INTERFACE_(IABContainer,IMAPIContainer) {
  788. BEGIN_INTERFACE
  789. MAPI_IUNKNOWN_METHODS(PURE)
  790. MAPI_IMAPIPROP_METHODS(PURE)
  791. MAPI_IMAPICONTAINER_METHODS(PURE)
  792. MAPI_IABCONTAINER_METHODS(PURE)
  793. };
  794. #define MAPI_SEND_NO_RICH_INFO ((ULONG) 0x00010000)
  795. #define MAPI_DIAG(_code) ((LONG) _code)
  796. #define MAPI_DIAG_NO_DIAGNOSTIC MAPI_DIAG(-1)
  797. #define MAPI_DIAG_OR_NAME_UNRECOGNIZED MAPI_DIAG(0)
  798. #define MAPI_DIAG_OR_NAME_AMBIGUOUS MAPI_DIAG(1)
  799. #define MAPI_DIAG_MTS_CONGESTED MAPI_DIAG(2)
  800. #define MAPI_DIAG_LOOP_DETECTED MAPI_DIAG(3)
  801. #define MAPI_DIAG_RECIPIENT_UNAVAILABLE MAPI_DIAG(4)
  802. #define MAPI_DIAG_MAXIMUM_TIME_EXPIRED MAPI_DIAG(5)
  803. #define MAPI_DIAG_EITS_UNSUPPORTED MAPI_DIAG(6)
  804. #define MAPI_DIAG_CONTENT_TOO_LONG MAPI_DIAG(7)
  805. #define MAPI_DIAG_IMPRACTICAL_TO_CONVERT MAPI_DIAG(8)
  806. #define MAPI_DIAG_PROHIBITED_TO_CONVERT MAPI_DIAG(9)
  807. #define MAPI_DIAG_CONVERSION_UNSUBSCRIBED MAPI_DIAG(10)
  808. #define MAPI_DIAG_PARAMETERS_INVALID MAPI_DIAG(11)
  809. #define MAPI_DIAG_CONTENT_SYNTAX_IN_ERROR MAPI_DIAG(12)
  810. #define MAPI_DIAG_LENGTH_CONSTRAINT_VIOLATD MAPI_DIAG(13)
  811. #define MAPI_DIAG_NUMBER_CONSTRAINT_VIOLATD MAPI_DIAG(14)
  812. #define MAPI_DIAG_CONTENT_TYPE_UNSUPPORTED MAPI_DIAG(15)
  813. #define MAPI_DIAG_TOO_MANY_RECIPIENTS MAPI_DIAG(16)
  814. #define MAPI_DIAG_NO_BILATERAL_AGREEMENT MAPI_DIAG(17)
  815. #define MAPI_DIAG_CRITICAL_FUNC_UNSUPPORTED MAPI_DIAG(18)
  816. #define MAPI_DIAG_CONVERSION_LOSS_PROHIB MAPI_DIAG(19)
  817. #define MAPI_DIAG_LINE_TOO_LONG MAPI_DIAG(20)
  818. #define MAPI_DIAG_PAGE_TOO_LONG MAPI_DIAG(21)
  819. #define MAPI_DIAG_PICTORIAL_SYMBOL_LOST MAPI_DIAG(22)
  820. #define MAPI_DIAG_PUNCTUATION_SYMBOL_LOST MAPI_DIAG(23)
  821. #define MAPI_DIAG_ALPHABETIC_CHARACTER_LOST MAPI_DIAG(24)
  822. #define MAPI_DIAG_MULTIPLE_INFO_LOSSES MAPI_DIAG(25)
  823. #define MAPI_DIAG_REASSIGNMENT_PROHIBITED MAPI_DIAG(26)
  824. #define MAPI_DIAG_REDIRECTION_LOOP_DETECTED MAPI_DIAG(27)
  825. #define MAPI_DIAG_EXPANSION_PROHIBITED MAPI_DIAG(28)
  826. #define MAPI_DIAG_SUBMISSION_PROHIBITED MAPI_DIAG(29)
  827. #define MAPI_DIAG_EXPANSION_FAILED MAPI_DIAG(30)
  828. #define MAPI_DIAG_RENDITION_UNSUPPORTED MAPI_DIAG(31)
  829. #define MAPI_DIAG_MAIL_ADDRESS_INCORRECT MAPI_DIAG(32)
  830. #define MAPI_DIAG_MAIL_OFFICE_INCOR_OR_INVD MAPI_DIAG(33)
  831. #define MAPI_DIAG_MAIL_ADDRESS_INCOMPLETE MAPI_DIAG(34)
  832. #define MAPI_DIAG_MAIL_RECIPIENT_UNKNOWN MAPI_DIAG(35)
  833. #define MAPI_DIAG_MAIL_RECIPIENT_DECEASED MAPI_DIAG(36)
  834. #define MAPI_DIAG_MAIL_ORGANIZATION_EXPIRED MAPI_DIAG(37)
  835. #define MAPI_DIAG_MAIL_REFUSED MAPI_DIAG(38)
  836. #define MAPI_DIAG_MAIL_UNCLAIMED MAPI_DIAG(39)
  837. #define MAPI_DIAG_MAIL_RECIPIENT_MOVED MAPI_DIAG(40)
  838. #define MAPI_DIAG_MAIL_RECIPIENT_TRAVELLING MAPI_DIAG(41)
  839. #define MAPI_DIAG_MAIL_RECIPIENT_DEPARTED MAPI_DIAG(42)
  840. #define MAPI_DIAG_MAIL_NEW_ADDRESS_UNKNOWN MAPI_DIAG(43)
  841. #define MAPI_DIAG_MAIL_FORWARDING_UNWANTED MAPI_DIAG(44)
  842. #define MAPI_DIAG_MAIL_FORWARDING_PROHIB MAPI_DIAG(45)
  843. #define MAPI_DIAG_SECURE_MESSAGING_ERROR MAPI_DIAG(46)
  844. #define MAPI_DIAG_DOWNGRADING_IMPOSSIBLE MAPI_DIAG(47)
  845. #define MAPI_MH_DP_PUBLIC_UA ((ULONG) 0)
  846. #define MAPI_MH_DP_PRIVATE_UA ((ULONG) 1)
  847. #define MAPI_MH_DP_MS ((ULONG) 2)
  848. #define MAPI_MH_DP_ML ((ULONG) 3)
  849. #define MAPI_MH_DP_PDAU ((ULONG) 4)
  850. #define MAPI_MH_DP_PDS_PATRON ((ULONG) 5)
  851. #define MAPI_MH_DP_OTHER_AU ((ULONG) 6)
  852. #define MAPI_IMAILUSER_METHODS(IPURE)
  853. #undef INTERFACE
  854. #define INTERFACE IMailUser
  855. DECLARE_MAPI_INTERFACE_(IMailUser,IMAPIProp) {
  856. BEGIN_INTERFACE
  857. MAPI_IUNKNOWN_METHODS(PURE)
  858. MAPI_IMAPIPROP_METHODS(PURE)
  859. MAPI_IMAILUSER_METHODS(PURE)
  860. };
  861. #define MAPI_IDISTLIST_METHODS(IPURE) MAPIMETHOD(CreateEntry) (THIS_ ULONG cbEntryID,LPENTRYID lpEntryID,ULONG ulCreateFlags,LPMAPIPROP *lppMAPIPropEntry) IPURE; MAPIMETHOD(CopyEntries) (THIS_ LPENTRYLIST lpEntries,ULONG ulUIParam,LPMAPIPROGRESS lpProgress,ULONG ulFlags) IPURE; MAPIMETHOD(DeleteEntries) (THIS_ LPENTRYLIST lpEntries,ULONG ulFlags) IPURE; MAPIMETHOD(ResolveNames) (THIS_ LPSPropTagArray lpPropTagArray,ULONG ulFlags,LPADRLIST lpAdrList,LPFlagList lpFlagList) IPURE;
  862. #undef INTERFACE
  863. #define INTERFACE IDistList
  864. DECLARE_MAPI_INTERFACE_(IDistList,IMAPIContainer) {
  865. BEGIN_INTERFACE
  866. MAPI_IUNKNOWN_METHODS(PURE)
  867. MAPI_IMAPIPROP_METHODS(PURE)
  868. MAPI_IMAPICONTAINER_METHODS(PURE)
  869. MAPI_IDISTLIST_METHODS(PURE)
  870. };
  871. #define FOLDER_ROOT ((ULONG) 0x00000000)
  872. #define FOLDER_GENERIC ((ULONG) 0x00000001)
  873. #define FOLDER_SEARCH ((ULONG) 0x00000002)
  874. #define MESSAGE_MOVE ((ULONG) 0x00000001)
  875. #define MESSAGE_DIALOG ((ULONG) 0x00000002)
  876. #define OPEN_IF_EXISTS ((ULONG) 0x00000001)
  877. #define DEL_MESSAGES ((ULONG) 0x00000001)
  878. #define FOLDER_DIALOG ((ULONG) 0x00000002)
  879. #define DEL_FOLDERS ((ULONG) 0x00000004)
  880. #define DEL_ASSOCIATED ((ULONG) 0x00000008)
  881. #define FOLDER_MOVE ((ULONG) 0x00000001)
  882. #define COPY_SUBFOLDERS ((ULONG) 0x00000010)
  883. #define MSGSTATUS_HIGHLIGHTED ((ULONG) 0x00000001)
  884. #define MSGSTATUS_TAGGED ((ULONG) 0x00000002)
  885. #define MSGSTATUS_HIDDEN ((ULONG) 0x00000004)
  886. #define MSGSTATUS_DELMARKED ((ULONG) 0x00000008)
  887. #define MSGSTATUS_REMOTE_DOWNLOAD ((ULONG) 0x00001000)
  888. #define MSGSTATUS_REMOTE_DELETE ((ULONG) 0x00002000)
  889. #define RECURSIVE_SORT ((ULONG) 0x00000002)
  890. #define FLDSTATUS_HIGHLIGHTED ((ULONG) 0x00000001)
  891. #define FLDSTATUS_TAGGED ((ULONG) 0x00000002)
  892. #define FLDSTATUS_HIDDEN ((ULONG) 0x00000004)
  893. #define FLDSTATUS_DELMARKED ((ULONG) 0x00000008)
  894. #define MAPI_IMAPIFOLDER_METHODS(IPURE) MAPIMETHOD(CreateMessage) (THIS_ LPCIID lpInterface,ULONG ulFlags,LPMESSAGE *lppMessage) IPURE; MAPIMETHOD(CopyMessages) (THIS_ LPENTRYLIST lpMsgList,LPCIID lpInterface,LPVOID lpDestFolder,ULONG ulUIParam,LPMAPIPROGRESS lpProgress,ULONG ulFlags) IPURE; MAPIMETHOD(DeleteMessages) (THIS_ LPENTRYLIST lpMsgList,ULONG ulUIParam,LPMAPIPROGRESS lpProgress,ULONG ulFlags) IPURE; MAPIMETHOD(CreateFolder) (THIS_ ULONG ulFolderType,LPTSTR lpszFolderName,LPTSTR lpszFolderComment,LPCIID lpInterface,ULONG ulFlags,LPMAPIFOLDER *lppFolder) IPURE; MAPIMETHOD(CopyFolder) (THIS_ ULONG cbEntryID,LPENTRYID lpEntryID,LPCIID lpInterface,LPVOID lpDestFolder,LPTSTR lpszNewFolderName,ULONG ulUIParam,LPMAPIPROGRESS lpProgress,ULONG ulFlags) IPURE; MAPIMETHOD(DeleteFolder) (THIS_ ULONG cbEntryID,LPENTRYID lpEntryID,ULONG ulUIParam,LPMAPIPROGRESS lpProgress,ULONG ulFlags) IPURE; MAPIMETHOD(SetReadFlags) (THIS_ LPENTRYLIST lpMsgList,ULONG ulUIParam,LPMAPIPROGRESS lpProgress,ULONG ulFlags) IPURE; MAPIMETHOD(GetMessageStatus) (THIS_ ULONG cbEntryID,LPENTRYID lpEntryID,ULONG ulFlags,ULONG *lpulMessageStatus) IPURE; MAPIMETHOD(SetMessageStatus) (THIS_ ULONG cbEntryID,LPENTRYID lpEntryID,ULONG ulNewStatus,ULONG ulNewStatusMask,ULONG *lpulOldStatus) IPURE; MAPIMETHOD(SaveContentsSort) (THIS_ LPSSortOrderSet lpSortCriteria,ULONG ulFlags) IPURE; MAPIMETHOD(EmptyFolder) (THIS_ ULONG ulUIParam,LPMAPIPROGRESS lpProgress,ULONG ulFlags) IPURE;
  895. #undef INTERFACE
  896. #define INTERFACE IMAPIFolder
  897. DECLARE_MAPI_INTERFACE_(IMAPIFolder,IMAPIContainer) {
  898. BEGIN_INTERFACE
  899. MAPI_IUNKNOWN_METHODS(PURE)
  900. MAPI_IMAPIPROP_METHODS(PURE)
  901. MAPI_IMAPICONTAINER_METHODS(PURE)
  902. MAPI_IMAPIFOLDER_METHODS(PURE)
  903. };
  904. #define STORE_ENTRYID_UNIQUE ((ULONG) 0x00000001)
  905. #define STORE_READONLY ((ULONG) 0x00000002)
  906. #define STORE_SEARCH_OK ((ULONG) 0x00000004)
  907. #define STORE_MODIFY_OK ((ULONG) 0x00000008)
  908. #define STORE_CREATE_OK ((ULONG) 0x00000010)
  909. #define STORE_ATTACH_OK ((ULONG) 0x00000020)
  910. #define STORE_OLE_OK ((ULONG) 0x00000040)
  911. #define STORE_SUBMIT_OK ((ULONG) 0x00000080)
  912. #define STORE_NOTIFY_OK ((ULONG) 0x00000100)
  913. #define STORE_MV_PROPS_OK ((ULONG) 0x00000200)
  914. #define STORE_CATEGORIZE_OK ((ULONG) 0x00000400)
  915. #define STORE_RTF_OK ((ULONG) 0x00000800)
  916. #define STORE_RESTRICTION_OK ((ULONG) 0x00001000)
  917. #define STORE_SORT_OK ((ULONG) 0x00002000)
  918. #define STORE_PUBLIC_FOLDERS ((ULONG) 0x00004000)
  919. #define STORE_UNCOMPRESSED_RTF ((ULONG) 0x00008000)
  920. #define STORE_HAS_SEARCHES ((ULONG) 0x01000000)
  921. #define LOGOFF_NO_WAIT ((ULONG) 0x00000001)
  922. #define LOGOFF_ORDERLY ((ULONG) 0x00000002)
  923. #define LOGOFF_PURGE ((ULONG) 0x00000004)
  924. #define LOGOFF_ABORT ((ULONG) 0x00000008)
  925. #define LOGOFF_QUIET ((ULONG) 0x00000010)
  926. #define LOGOFF_COMPLETE ((ULONG) 0x00010000)
  927. #define LOGOFF_INBOUND ((ULONG) 0x00020000)
  928. #define LOGOFF_OUTBOUND ((ULONG) 0x00040000)
  929. #define LOGOFF_OUTBOUND_QUEUE ((ULONG) 0x00080000)
  930. #define MSG_LOCKED ((ULONG) 0x00000001)
  931. #define MSG_UNLOCKED ((ULONG) 0x00000000)
  932. #define FOLDER_IPM_SUBTREE_VALID ((ULONG) 0x00000001)
  933. #define FOLDER_IPM_INBOX_VALID ((ULONG) 0x00000002)
  934. #define FOLDER_IPM_OUTBOX_VALID ((ULONG) 0x00000004)
  935. #define FOLDER_IPM_WASTEBASKET_VALID ((ULONG) 0x00000008)
  936. #define FOLDER_IPM_SENTMAIL_VALID ((ULONG) 0x00000010)
  937. #define FOLDER_VIEWS_VALID ((ULONG) 0x00000020)
  938. #define FOLDER_COMMON_VIEWS_VALID ((ULONG) 0x00000040)
  939. #define FOLDER_FINDER_VALID ((ULONG) 0x00000080)
  940. #define MAPI_IMSGSTORE_METHODS(IPURE) MAPIMETHOD(Advise) (THIS_ ULONG cbEntryID,LPENTRYID lpEntryID,ULONG ulEventMask,LPMAPIADVISESINK lpAdviseSink,ULONG *lpulConnection) IPURE; MAPIMETHOD(Unadvise) (THIS_ ULONG ulConnection) IPURE; MAPIMETHOD(CompareEntryIDs) (THIS_ ULONG cbEntryID1,LPENTRYID lpEntryID1,ULONG cbEntryID2,LPENTRYID lpEntryID2,ULONG ulFlags,ULONG *lpulResult) IPURE; MAPIMETHOD(OpenEntry) (THIS_ ULONG cbEntryID,LPENTRYID lpEntryID,LPCIID lpInterface,ULONG ulFlags,ULONG *lpulObjType,LPUNKNOWN *lppUnk) IPURE; MAPIMETHOD(SetReceiveFolder) (THIS_ LPTSTR lpszMessageClass,ULONG ulFlags,ULONG cbEntryID,LPENTRYID lpEntryID) IPURE; MAPIMETHOD(GetReceiveFolder) (THIS_ LPTSTR lpszMessageClass,ULONG ulFlags,ULONG *lpcbEntryID,LPENTRYID *lppEntryID,LPTSTR *lppszExplicitClass) IPURE; MAPIMETHOD(GetReceiveFolderTable) (THIS_ ULONG ulFlags,LPMAPITABLE *lppTable) IPURE; MAPIMETHOD(StoreLogoff) (THIS_ ULONG *lpulFlags) IPURE; MAPIMETHOD(AbortSubmit) (THIS_ ULONG cbEntryID,LPENTRYID lpEntryID,ULONG ulFlags) IPURE; MAPIMETHOD(GetOutgoingQueue) (THIS_ ULONG ulFlags,LPMAPITABLE *lppTable) IPURE; MAPIMETHOD(SetLockState) (THIS_ LPMESSAGE lpMessage,ULONG ulLockState) IPURE; MAPIMETHOD(FinishedMsg) (THIS_ ULONG ulFlags,ULONG cbEntryID,LPENTRYID lpEntryID) IPURE; MAPIMETHOD(NotifyNewMail) (THIS_ LPNOTIFICATION lpNotification) IPURE;
  941. #undef INTERFACE
  942. #define INTERFACE IMsgStore
  943. DECLARE_MAPI_INTERFACE_(IMsgStore,IMAPIProp) {
  944. BEGIN_INTERFACE
  945. MAPI_IUNKNOWN_METHODS(PURE)
  946. MAPI_IMAPIPROP_METHODS(PURE)
  947. MAPI_IMSGSTORE_METHODS(PURE)
  948. };
  949. #define FORCE_SUBMIT ((ULONG) 0x00000001)
  950. #define MSGFLAG_READ ((ULONG) 0x00000001)
  951. #define MSGFLAG_UNMODIFIED ((ULONG) 0x00000002)
  952. #define MSGFLAG_SUBMIT ((ULONG) 0x00000004)
  953. #define MSGFLAG_UNSENT ((ULONG) 0x00000008)
  954. #define MSGFLAG_HASATTACH ((ULONG) 0x00000010)
  955. #define MSGFLAG_FROMME ((ULONG) 0x00000020)
  956. #define MSGFLAG_ASSOCIATED ((ULONG) 0x00000040)
  957. #define MSGFLAG_RESEND ((ULONG) 0x00000080)
  958. #define MSGFLAG_RN_PENDING ((ULONG) 0x00000100)
  959. #define MSGFLAG_NRN_PENDING ((ULONG) 0x00000200)
  960. #define SUBMITFLAG_LOCKED ((ULONG) 0x00000001)
  961. #define SUBMITFLAG_PREPROCESS ((ULONG) 0x00000002)
  962. #define MODRECIP_ADD ((ULONG) 0x00000002)
  963. #define MODRECIP_MODIFY ((ULONG) 0x00000004)
  964. #define MODRECIP_REMOVE ((ULONG) 0x00000008)
  965. #define SUPPRESS_RECEIPT ((ULONG) 0x00000001)
  966. #define CLEAR_READ_FLAG ((ULONG) 0x00000004)
  967. #define GENERATE_RECEIPT_ONLY ((ULONG) 0x00000010)
  968. #define CLEAR_RN_PENDING ((ULONG) 0x00000020)
  969. #define CLEAR_NRN_PENDING ((ULONG) 0x00000040)
  970. #define ATTACH_DIALOG ((ULONG) 0x00000001)
  971. #define SECURITY_SIGNED ((ULONG) 0x00000001)
  972. #define SECURITY_ENCRYPTED ((ULONG) 0x00000002)
  973. #define PRIO_URGENT ((__LONG32) 1)
  974. #define PRIO_NORMAL ((__LONG32) 0)
  975. #define PRIO_NONURGENT ((__LONG32) -1)
  976. #define SENSITIVITY_NONE ((ULONG) 0x00000000)
  977. #define SENSITIVITY_PERSONAL ((ULONG) 0x00000001)
  978. #define SENSITIVITY_PRIVATE ((ULONG) 0x00000002)
  979. #define SENSITIVITY_COMPANY_CONFIDENTIAL ((ULONG) 0x00000003)
  980. #define IMPORTANCE_LOW ((__LONG32) 0)
  981. #define IMPORTANCE_NORMAL ((__LONG32) 1)
  982. #define IMPORTANCE_HIGH ((__LONG32) 2)
  983. #define MAPI_IMESSAGE_METHODS(IPURE) MAPIMETHOD(GetAttachmentTable) (THIS_ ULONG ulFlags,LPMAPITABLE *lppTable) IPURE; MAPIMETHOD(OpenAttach) (THIS_ ULONG ulAttachmentNum,LPCIID lpInterface,ULONG ulFlags,LPATTACH *lppAttach) IPURE; MAPIMETHOD(CreateAttach) (THIS_ LPCIID lpInterface,ULONG ulFlags,ULONG *lpulAttachmentNum,LPATTACH *lppAttach) IPURE; MAPIMETHOD(DeleteAttach) (THIS_ ULONG ulAttachmentNum,ULONG ulUIParam,LPMAPIPROGRESS lpProgress,ULONG ulFlags) IPURE; MAPIMETHOD(GetRecipientTable) (THIS_ ULONG ulFlags,LPMAPITABLE *lppTable) IPURE; MAPIMETHOD(ModifyRecipients) (THIS_ ULONG ulFlags,LPADRLIST lpMods) IPURE; MAPIMETHOD(SubmitMessage) (THIS_ ULONG ulFlags) IPURE; MAPIMETHOD(SetReadFlag) (THIS_ ULONG ulFlags) IPURE;
  984. #undef INTERFACE
  985. #define INTERFACE IMessage
  986. DECLARE_MAPI_INTERFACE_(IMessage,IMAPIProp) {
  987. BEGIN_INTERFACE
  988. MAPI_IUNKNOWN_METHODS(PURE)
  989. MAPI_IMAPIPROP_METHODS(PURE)
  990. MAPI_IMESSAGE_METHODS(PURE)
  991. };
  992. #define NO_ATTACHMENT ((ULONG) 0x00000000)
  993. #define ATTACH_BY_VALUE ((ULONG) 0x00000001)
  994. #define ATTACH_BY_REFERENCE ((ULONG) 0x00000002)
  995. #define ATTACH_BY_REF_RESOLVE ((ULONG) 0x00000003)
  996. #define ATTACH_BY_REF_ONLY ((ULONG) 0x00000004)
  997. #define ATTACH_EMBEDDED_MSG ((ULONG) 0x00000005)
  998. #define ATTACH_OLE ((ULONG) 0x00000006)
  999. #define MAPI_IATTACH_METHODS(IPURE)
  1000. #undef INTERFACE
  1001. #define INTERFACE IAttach
  1002. DECLARE_MAPI_INTERFACE_(IAttach,IMAPIProp) {
  1003. BEGIN_INTERFACE
  1004. MAPI_IUNKNOWN_METHODS(PURE)
  1005. MAPI_IMAPIPROP_METHODS(PURE)
  1006. MAPI_IATTACH_METHODS(PURE)
  1007. };
  1008. #define GET_ADRPARM_VERSION(ulFlags) (((ULONG)ulFlags) & 0xF0000000)
  1009. #define SET_ADRPARM_VERSION(ulFlags,ulVersion) (((ULONG)ulVersion) | (((ULONG)ulFlags) & 0x0FFFFFFF))
  1010. #define ADRPARM_HELP_CTX ((ULONG) 0x00000000)
  1011. #define DIALOG_MODAL ((ULONG) 0x00000001)
  1012. #define DIALOG_SDI ((ULONG) 0x00000002)
  1013. #define DIALOG_OPTIONS ((ULONG) 0x00000004)
  1014. #define ADDRESS_ONE ((ULONG) 0x00000008)
  1015. #define AB_SELECTONLY ((ULONG) 0x00000010)
  1016. #define AB_RESOLVE ((ULONG) 0x00000020)
  1017. #define DT_MAILUSER ((ULONG) 0x00000000)
  1018. #define DT_DISTLIST ((ULONG) 0x00000001)
  1019. #define DT_FORUM ((ULONG) 0x00000002)
  1020. #define DT_AGENT ((ULONG) 0x00000003)
  1021. #define DT_ORGANIZATION ((ULONG) 0x00000004)
  1022. #define DT_PRIVATE_DISTLIST ((ULONG) 0x00000005)
  1023. #define DT_REMOTE_MAILUSER ((ULONG) 0x00000006)
  1024. #define DT_MODIFIABLE ((ULONG) 0x00010000)
  1025. #define DT_GLOBAL ((ULONG) 0x00020000)
  1026. #define DT_LOCAL ((ULONG) 0x00030000)
  1027. #define DT_WAN ((ULONG) 0x00040000)
  1028. #define DT_NOT_SPECIFIC ((ULONG) 0x00050000)
  1029. #define DT_FOLDER ((ULONG) 0x01000000)
  1030. #define DT_FOLDER_LINK ((ULONG) 0x02000000)
  1031. #define DT_FOLDER_SPECIAL ((ULONG) 0x04000000)
  1032. typedef WINBOOL (WINAPI ACCELERATEABSDI)(ULONG ulUIParam,LPVOID lpvmsg);
  1033. typedef ACCELERATEABSDI *LPFNABSDI;
  1034. typedef void (WINAPI DISMISSMODELESS)(ULONG ulUIParam,LPVOID lpvContext);
  1035. typedef DISMISSMODELESS *LPFNDISMISS;
  1036. typedef SCODE (WINAPI *LPFNBUTTON)(ULONG ulUIParam,LPVOID lpvContext,ULONG cbEntryID,LPENTRYID lpSelection,ULONG ulFlags);
  1037. typedef struct _ADRPARM {
  1038. ULONG cbABContEntryID;
  1039. LPENTRYID lpABContEntryID;
  1040. ULONG ulFlags;
  1041. LPVOID lpReserved;
  1042. ULONG ulHelpContext;
  1043. LPTSTR lpszHelpFileName;
  1044. LPFNABSDI lpfnABSDI;
  1045. LPFNDISMISS lpfnDismiss;
  1046. LPVOID lpvDismissContext;
  1047. LPTSTR lpszCaption;
  1048. LPTSTR lpszNewEntryTitle;
  1049. LPTSTR lpszDestWellsTitle;
  1050. ULONG cDestFields;
  1051. ULONG nDestFieldFocus;
  1052. LPTSTR *lppszDestTitles;
  1053. ULONG *lpulDestComps;
  1054. LPSRestriction lpContRestriction;
  1055. LPSRestriction lpHierRestriction;
  1056. } ADRPARM,*LPADRPARM;
  1057. #define MAPI_DEFERRED_ERRORS ((ULONG) 0x00000008)
  1058. #define MAPI_ASSOCIATED ((ULONG) 0x00000040)
  1059. #define MDB_NO_DIALOG ((ULONG) 0x00000001)
  1060. #define MDB_WRITE ((ULONG) 0x00000004)
  1061. #define MDB_TEMPORARY ((ULONG) 0x00000020)
  1062. #define MDB_NO_MAIL ((ULONG) 0x00000080)
  1063. #define AB_NO_DIALOG ((ULONG) 0x00000001)
  1064. #define MAPI_ENABLED ((ULONG) 0x00000000)
  1065. #define MAPI_DISABLED ((ULONG) 0x00000001)
  1066. #define MAPI_IMAPICONTROL_METHODS(IPURE) MAPIMETHOD(GetLastError) (THIS_ HRESULT hResult,ULONG ulFlags,LPMAPIERROR *lppMAPIError) IPURE; MAPIMETHOD(Activate) (THIS_ ULONG ulFlags,ULONG ulUIParam) IPURE; MAPIMETHOD(GetState) (THIS_ ULONG ulFlags,ULONG *lpulState) IPURE;
  1067. #undef INTERFACE
  1068. #define INTERFACE IMAPIControl
  1069. DECLARE_MAPI_INTERFACE_(IMAPIControl,IUnknown) {
  1070. BEGIN_INTERFACE
  1071. MAPI_IUNKNOWN_METHODS(PURE)
  1072. MAPI_IMAPICONTROL_METHODS(PURE)
  1073. };
  1074. DECLARE_MAPI_INTERFACE_PTR(IMAPIControl,LPMAPICONTROL);
  1075. #define DT_MULTILINE ((ULONG) 0x00000001)
  1076. #define DT_EDITABLE ((ULONG) 0x00000002)
  1077. #define DT_REQUIRED ((ULONG) 0x00000004)
  1078. #define DT_SET_IMMEDIATE ((ULONG) 0x00000008)
  1079. #define DT_PASSWORD_EDIT ((ULONG) 0x00000010)
  1080. #define DT_ACCEPT_DBCS ((ULONG) 0x00000020)
  1081. #define DT_SET_SELECTION ((ULONG) 0x00000040)
  1082. #define DTCT_LABEL ((ULONG) 0x00000000)
  1083. #define DTCT_EDIT ((ULONG) 0x00000001)
  1084. #define DTCT_LBX ((ULONG) 0x00000002)
  1085. #define DTCT_COMBOBOX ((ULONG) 0x00000003)
  1086. #define DTCT_DDLBX ((ULONG) 0x00000004)
  1087. #define DTCT_CHECKBOX ((ULONG) 0x00000005)
  1088. #define DTCT_GROUPBOX ((ULONG) 0x00000006)
  1089. #define DTCT_BUTTON ((ULONG) 0x00000007)
  1090. #define DTCT_PAGE ((ULONG) 0x00000008)
  1091. #define DTCT_RADIOBUTTON ((ULONG) 0x00000009)
  1092. #define DTCT_MVLISTBOX ((ULONG) 0x0000000B)
  1093. #define DTCT_MVDDLBX ((ULONG) 0x0000000C)
  1094. typedef struct _DTBLLABEL {
  1095. ULONG ulbLpszLabelName;
  1096. ULONG ulFlags;
  1097. } DTBLLABEL,*LPDTBLLABEL;
  1098. #define SizedDtblLabel(n,u) struct _DTBLLABEL_ ## u { DTBLLABEL dtbllabel; TCHAR lpszLabelName[n]; } u
  1099. typedef struct _DTBLEDIT {
  1100. ULONG ulbLpszCharsAllowed;
  1101. ULONG ulFlags;
  1102. ULONG ulNumCharsAllowed;
  1103. ULONG ulPropTag;
  1104. } DTBLEDIT,*LPDTBLEDIT;
  1105. #define SizedDtblEdit(n,u) struct _DTBLEDIT_ ## u { DTBLEDIT dtbledit; TCHAR lpszCharsAllowed[n]; } u
  1106. #define MAPI_NO_HBAR ((ULONG) 0x00000001)
  1107. #define MAPI_NO_VBAR ((ULONG) 0x00000002)
  1108. typedef struct _DTBLLBX {
  1109. ULONG ulFlags;
  1110. ULONG ulPRSetProperty;
  1111. ULONG ulPRTableName;
  1112. } DTBLLBX,*LPDTBLLBX;
  1113. typedef struct _DTBLCOMBOBOX {
  1114. ULONG ulbLpszCharsAllowed;
  1115. ULONG ulFlags;
  1116. ULONG ulNumCharsAllowed;
  1117. ULONG ulPRPropertyName;
  1118. ULONG ulPRTableName;
  1119. } DTBLCOMBOBOX,*LPDTBLCOMBOBOX;
  1120. #define SizedDtblComboBox(n,u) struct _DTBLCOMBOBOX_ ## u { DTBLCOMBOBOX dtblcombobox; TCHAR lpszCharsAllowed[n]; } u
  1121. typedef struct _DTBLDDLBX {
  1122. ULONG ulFlags;
  1123. ULONG ulPRDisplayProperty;
  1124. ULONG ulPRSetProperty;
  1125. ULONG ulPRTableName;
  1126. } DTBLDDLBX,*LPDTBLDDLBX;
  1127. typedef struct _DTBLCHECKBOX {
  1128. ULONG ulbLpszLabel;
  1129. ULONG ulFlags;
  1130. ULONG ulPRPropertyName;
  1131. } DTBLCHECKBOX,*LPDTBLCHECKBOX;
  1132. #define SizedDtblCheckBox(n,u) struct _DTBLCHECKBOX_ ## u { DTBLCHECKBOX dtblcheckbox; TCHAR lpszLabel[n]; } u
  1133. typedef struct _DTBLGROUPBOX {
  1134. ULONG ulbLpszLabel;
  1135. ULONG ulFlags;
  1136. } DTBLGROUPBOX,*LPDTBLGROUPBOX;
  1137. #define SizedDtblGroupBox(n,u) struct _DTBLGROUPBOX_ ## u { DTBLGROUPBOX dtblgroupbox; TCHAR lpszLabel[n]; } u
  1138. typedef struct _DTBLBUTTON {
  1139. ULONG ulbLpszLabel;
  1140. ULONG ulFlags;
  1141. ULONG ulPRControl;
  1142. } DTBLBUTTON,*LPDTBLBUTTON;
  1143. #define SizedDtblButton(n,u) struct _DTBLBUTTON_ ## u { DTBLBUTTON dtblbutton; TCHAR lpszLabel[n]; } u
  1144. typedef struct _DTBLPAGE {
  1145. ULONG ulbLpszLabel;
  1146. ULONG ulFlags;
  1147. ULONG ulbLpszComponent;
  1148. ULONG ulContext;
  1149. } DTBLPAGE,*LPDTBLPAGE;
  1150. #define SizedDtblPage(n,n1,u) struct _DTBLPAGE_ ## u { DTBLPAGE dtblpage; TCHAR lpszLabel[n]; TCHAR lpszComponent[n1]; } u
  1151. typedef struct _DTBLRADIOBUTTON {
  1152. ULONG ulbLpszLabel;
  1153. ULONG ulFlags;
  1154. ULONG ulcButtons;
  1155. ULONG ulPropTag;
  1156. __LONG32 lReturnValue;
  1157. } DTBLRADIOBUTTON,*LPDTBLRADIOBUTTON;
  1158. #define SizedDtblRadioButton(n,u) struct _DTBLRADIOBUTTON_ ## u { DTBLRADIOBUTTON dtblradiobutton; TCHAR lpszLabel[n]; } u
  1159. typedef struct _DTBLMVLISTBOX {
  1160. ULONG ulFlags;
  1161. ULONG ulMVPropTag;
  1162. } DTBLMVLISTBOX,*LPDTBLMVLISTBOX;
  1163. typedef struct _DTBLMVDDLBX {
  1164. ULONG ulFlags;
  1165. ULONG ulMVPropTag;
  1166. } DTBLMVDDLBX,*LPDTBLMVDDLBX;
  1167. #define UI_SERVICE 0x00000002
  1168. #define SERVICE_UI_ALWAYS 0x00000002
  1169. #define SERVICE_UI_ALLOWED 0x00000010
  1170. #define UI_CURRENT_PROVIDER_FIRST 0x00000004
  1171. #define MAPI_IPROVIDERADMIN_METHODS(IPURE) MAPIMETHOD(GetLastError) (THIS_ HRESULT hResult,ULONG ulFlags,LPMAPIERROR *lppMAPIError) IPURE; MAPIMETHOD(GetProviderTable) (THIS_ ULONG ulFlags,LPMAPITABLE *lppTable) IPURE; MAPIMETHOD(CreateProvider) (THIS_ LPTSTR lpszProvider,ULONG cValues,LPSPropValue lpProps,ULONG ulUIParam,ULONG ulFlags,MAPIUID *lpUID) IPURE; MAPIMETHOD(DeleteProvider) (THIS_ LPMAPIUID lpUID) IPURE; MAPIMETHOD(OpenProfileSection) (THIS_ LPMAPIUID lpUID,LPCIID lpInterface,ULONG ulFlags,LPPROFSECT *lppProfSect) IPURE;
  1172. #undef INTERFACE
  1173. #define INTERFACE IProviderAdmin
  1174. DECLARE_MAPI_INTERFACE_(IProviderAdmin,IUnknown) {
  1175. BEGIN_INTERFACE
  1176. MAPI_IUNKNOWN_METHODS(PURE)
  1177. MAPI_IPROVIDERADMIN_METHODS(PURE)
  1178. };
  1179. #ifdef __cplusplus
  1180. }
  1181. #endif
  1182. #endif