1 | /*
|
---|
2 | * Copyright (C) 1998 Justin Bradford
|
---|
3 | *
|
---|
4 | * This library is free software; you can redistribute it and/or
|
---|
5 | * modify it under the terms of the GNU Lesser General Public
|
---|
6 | * License as published by the Free Software Foundation; either
|
---|
7 | * version 2.1 of the License, or (at your option) any later version.
|
---|
8 | *
|
---|
9 | * This library is distributed in the hope that it will be useful,
|
---|
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
12 | * Lesser General Public License for more details.
|
---|
13 | *
|
---|
14 | * You should have received a copy of the GNU Lesser General Public
|
---|
15 | * License along with this library; if not, write to the Free Software
|
---|
16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
17 | */
|
---|
18 |
|
---|
19 | /*
|
---|
20 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
21 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
22 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
23 | * a choice of LGPL license versions is made available with the language indicating
|
---|
24 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
25 | * of the LGPL is applied is otherwise unspecified.
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef MAPIDEFS_H
|
---|
29 | #define MAPIDEFS_H
|
---|
30 |
|
---|
31 | #ifndef __WINESRC__
|
---|
32 | # include <windows.h>
|
---|
33 | #endif
|
---|
34 |
|
---|
35 | #include <winerror.h>
|
---|
36 | #include <objbase.h>
|
---|
37 | #include <stddef.h>
|
---|
38 |
|
---|
39 | /* Some types from other headers */
|
---|
40 | #ifndef __LHANDLE
|
---|
41 | #define __LHANDLE
|
---|
42 | typedef ULONG_PTR LHANDLE, *LPLHANDLE;
|
---|
43 | #endif
|
---|
44 |
|
---|
45 | #ifndef _tagCY_DEFINED
|
---|
46 | #define _tagCY_DEFINED
|
---|
47 | typedef union tagCY
|
---|
48 | {
|
---|
49 | struct
|
---|
50 | {
|
---|
51 | #ifdef WORDS_BIGENDIAN
|
---|
52 | LONG Hi;
|
---|
53 | ULONG Lo;
|
---|
54 | #else
|
---|
55 | ULONG Lo;
|
---|
56 | LONG Hi;
|
---|
57 | #endif
|
---|
58 | } DUMMYSTRUCTNAME;
|
---|
59 | LONGLONG int64;
|
---|
60 | } CY;
|
---|
61 | typedef CY CURRENCY;
|
---|
62 | #endif /* _tagCY_DEFINED */
|
---|
63 |
|
---|
64 |
|
---|
65 | #ifndef _FILETIME_
|
---|
66 | #define _FILETIME_
|
---|
67 | typedef struct _FILETIME
|
---|
68 | {
|
---|
69 | #ifdef WORDS_BIGENDIAN
|
---|
70 | DWORD dwHighDateTime;
|
---|
71 | DWORD dwLowDateTime;
|
---|
72 | #else
|
---|
73 | DWORD dwLowDateTime;
|
---|
74 | DWORD dwHighDateTime;
|
---|
75 | #endif
|
---|
76 | } FILETIME, *PFILETIME, *LPFILETIME;
|
---|
77 | #endif
|
---|
78 |
|
---|
79 | /* Memory allocation routines */
|
---|
80 | typedef SCODE (WINAPI ALLOCATEBUFFER)(ULONG,LPVOID*);
|
---|
81 | typedef SCODE (WINAPI ALLOCATEMORE)(ULONG,LPVOID,LPVOID*);
|
---|
82 | typedef ULONG (WINAPI FREEBUFFER)(LPVOID);
|
---|
83 |
|
---|
84 | typedef ALLOCATEBUFFER *LPALLOCATEBUFFER;
|
---|
85 | typedef ALLOCATEMORE *LPALLOCATEMORE;
|
---|
86 | typedef FREEBUFFER *LPFREEBUFFER;
|
---|
87 |
|
---|
88 | /* MAPI exposed interfaces */
|
---|
89 | typedef const IID *LPCIID;
|
---|
90 |
|
---|
91 | typedef struct IAddrBook IAddrBook;
|
---|
92 | typedef IAddrBook *LPADRBOOK;
|
---|
93 | typedef struct IABContainer IABContainer;
|
---|
94 | typedef IABContainer *LPABCONT;
|
---|
95 | typedef struct IAttach IAttach;
|
---|
96 | typedef IAttach *LPATTACH;
|
---|
97 | typedef struct IDistList IDistList;
|
---|
98 | typedef IDistList *LPDISTLIST;
|
---|
99 | typedef struct IMailUser IMailUser;
|
---|
100 | typedef IMailUser *LPMAILUSER;
|
---|
101 | typedef struct IMAPIAdviseSink *LPMAPIADVISESINK;
|
---|
102 | typedef struct IMAPIContainer IMAPIContainer;
|
---|
103 | typedef IMAPIContainer *LPMAPICONTAINER;
|
---|
104 | typedef struct IMAPIFolder IMAPIFolder;
|
---|
105 | typedef IMAPIFolder *LPMAPIFOLDER;
|
---|
106 | typedef struct IMAPIProgress IMAPIProgress;
|
---|
107 | typedef IMAPIProgress *LPMAPIPROGRESS;
|
---|
108 | typedef struct IMAPIStatus IMAPIStatus;
|
---|
109 | typedef IMAPIStatus *LPMAPISTATUS;
|
---|
110 | typedef struct IMessage IMessage;
|
---|
111 | typedef IMessage *LPMESSAGE;
|
---|
112 | typedef struct IMsgStore IMsgStore;
|
---|
113 | typedef IMsgStore *LPMDB;
|
---|
114 | typedef struct IProfSect IProfSect;
|
---|
115 | typedef IProfSect *LPPROFSECT;
|
---|
116 | typedef struct IProviderAdmin IProviderAdmin;
|
---|
117 | typedef IProviderAdmin *LPPROVIDERADMIN;
|
---|
118 |
|
---|
119 | #ifndef MAPI_DIM
|
---|
120 | # define MAPI_DIM 1 /* Default to one dimension for variable length arrays */
|
---|
121 | #endif
|
---|
122 |
|
---|
123 | /* Flags for abFlags[0] */
|
---|
124 | #define MAPI_NOTRESERVED 0x08
|
---|
125 | #define MAPI_NOW 0x10
|
---|
126 | #define MAPI_THISSESSION 0x20
|
---|
127 | #define MAPI_NOTRECIP 0x40
|
---|
128 | #define MAPI_SHORTTERM 0x80
|
---|
129 |
|
---|
130 | /* Flags for abFlags[1] */
|
---|
131 | #define MAPI_COMPOUND 0x80
|
---|
132 |
|
---|
133 | typedef struct _ENTRYID
|
---|
134 | {
|
---|
135 | BYTE abFlags[4];
|
---|
136 | BYTE ab[MAPI_DIM];
|
---|
137 | } ENTRYID, *LPENTRYID;
|
---|
138 |
|
---|
139 | /* MAPI GUID's */
|
---|
140 | typedef struct _MAPIUID
|
---|
141 | {
|
---|
142 | BYTE ab[sizeof(GUID)];
|
---|
143 | } MAPIUID, *LPMAPIUID;
|
---|
144 |
|
---|
145 | #define IsEqualMAPIUID(pl,pr) (!memcmp((pl),(pr),sizeof(MAPIUID)))
|
---|
146 |
|
---|
147 | #define MAPI_ONE_OFF_UID { 0x81,0x2b,0x1f,0xa4,0xbe,0xa3,0x10,0x19,0x9d,0x6e, \
|
---|
148 | 0x00,0xdd,0x01,0x0f,0x54,0x02 }
|
---|
149 | #define MAPI_ONE_OFF_UNICODE 0x8000
|
---|
150 | #define MAPI_ONE_OFF_NO_RICH_INFO 0x0001
|
---|
151 |
|
---|
152 | /* Object types */
|
---|
153 | #define MAPI_STORE 1U
|
---|
154 | #define MAPI_ADDRBOOK 2U
|
---|
155 | #define MAPI_FOLDER 3U
|
---|
156 | #define MAPI_ABCONT 4U
|
---|
157 | #define MAPI_MESSAGE 5U
|
---|
158 | #define MAPI_MAILUSER 6U
|
---|
159 | #define MAPI_ATTACH 7U
|
---|
160 | #define MAPI_DISTLIST 8U
|
---|
161 | #define MAPI_PROFSECT 9U
|
---|
162 | #define MAPI_STATUS 10U
|
---|
163 | #define MAPI_SESSION 11U
|
---|
164 | #define MAPI_FORMINFO 12U
|
---|
165 |
|
---|
166 | /* Flags for various calls */
|
---|
167 | #define MAPI_MODIFY 0x00000001U /* Object can be modified */
|
---|
168 | #define MAPI_ACCESS_MODIFY MAPI_MODIFY /* Want write access */
|
---|
169 | #define MAPI_ACCESS_READ 0x00000002U /* Want read access */
|
---|
170 | #define MAPI_ACCESS_DELETE 0x00000004U /* Want delete access */
|
---|
171 | #define MAPI_ACCESS_CREATE_HIERARCHY 0x00000008U
|
---|
172 | #define MAPI_ACCESS_CREATE_CONTENTS 0x00000010U
|
---|
173 | #define MAPI_ACCESS_CREATE_ASSOCIATED 0x00000020U
|
---|
174 | #define MAPI_UNICODE 0x80000000U /* Strings in this call are Unicode */
|
---|
175 |
|
---|
176 | #if defined (UNICODE) || defined (__WINESRC__)
|
---|
177 | #define fMapiUnicode MAPI_UNICODE
|
---|
178 | #else
|
---|
179 | #define fMapiUnicode 0U
|
---|
180 | #endif
|
---|
181 |
|
---|
182 | /* Types of message receivers */
|
---|
183 | #ifndef MAPI_ORIG
|
---|
184 | #define MAPI_ORIG 0 /* The original author */
|
---|
185 | #define MAPI_TO 1 /* The primary message receiver */
|
---|
186 | #define MAPI_CC 2 /* A carbon copy receiver */
|
---|
187 | #define MAPI_BCC 3 /* A blind carbon copy receiver */
|
---|
188 | #define MAPI_P1 0x10000000 /* A message resend */
|
---|
189 | #define MAPI_SUBMITTED 0x80000000 /* This message has already been sent */
|
---|
190 | #endif
|
---|
191 |
|
---|
192 | #ifndef cchProfileNameMax
|
---|
193 | #define cchProfileNameMax 64 /* Maximum length of a profile name */
|
---|
194 | #define cchProfilePassMax 64 /* Maximum length of a profile password */
|
---|
195 | #endif
|
---|
196 |
|
---|
197 | /* Properties: The are the contents of cells in MAPI tables, as well as the
|
---|
198 | * values returned when object properties are queried.
|
---|
199 | */
|
---|
200 |
|
---|
201 | /* Property types */
|
---|
202 | #define PT_UNSPECIFIED 0U
|
---|
203 | #define PT_NULL 1U
|
---|
204 | #define PT_I2 2U
|
---|
205 | #define PT_SHORT PT_I2
|
---|
206 | #define PT_LONG 3U
|
---|
207 | #define PT_I4 PT_LONG
|
---|
208 | #define PT_R4 4U
|
---|
209 | #define PT_FLOAT PT_R4
|
---|
210 | #define PT_DOUBLE 5U
|
---|
211 | #define PT_R8 PT_DOUBLE
|
---|
212 | #define PT_CURRENCY 6U
|
---|
213 | #define PT_APPTIME 7U
|
---|
214 | #define PT_ERROR 10U
|
---|
215 | #define PT_BOOLEAN 11U
|
---|
216 | #define PT_OBJECT 13U
|
---|
217 | #define PT_I8 20U
|
---|
218 | #define PT_LONGLONG PT_I8
|
---|
219 | #define PT_STRING8 30U
|
---|
220 | #define PT_UNICODE 31U
|
---|
221 | #define PT_SYSTIME 64U
|
---|
222 | #define PT_CLSID 72U
|
---|
223 | #define PT_BINARY 258U
|
---|
224 |
|
---|
225 | #define MV_FLAG 0x1000 /* This property type is multi-valued (an array) */
|
---|
226 | #define MV_INSTANCE 0x2000
|
---|
227 | #define MVI_FLAG (MV_FLAG|MV_INSTANCE)
|
---|
228 | #define MVI_PROP(t) ((t)|MVI_FLAG)
|
---|
229 |
|
---|
230 | #ifndef WINE_NO_UNICODE_MACROS
|
---|
231 | # ifdef UNICODE
|
---|
232 | # define PT_TSTRING PT_UNICODE
|
---|
233 | # define PT_MV_TSTRING (MV_FLAG|PT_UNICODE)
|
---|
234 | # define LPSZ lpszW
|
---|
235 | # define LPPSZ lppszW
|
---|
236 | # define MVSZ MVszW
|
---|
237 | # else
|
---|
238 | # define PT_TSTRING PT_STRING8
|
---|
239 | # define PT_MV_TSTRING (MV_FLAG|PT_STRING8)
|
---|
240 | # define LPSZ lpszA
|
---|
241 | # define LPPSZ lppszA
|
---|
242 | # define MVSZ MVszA
|
---|
243 | # endif
|
---|
244 | #endif
|
---|
245 |
|
---|
246 | #define PROP_TYPE_MASK 0xFFFFU
|
---|
247 | #define PROP_TYPE(t) ((t) & PROP_TYPE_MASK)
|
---|
248 | #define PROP_ID(t) ((t) >> 16)
|
---|
249 | #define PROP_TAG(t,id) (((id) << 16) | t)
|
---|
250 | #define PROP_ID_NULL 0
|
---|
251 | #define PROP_ID_INVALID 0xFFFF
|
---|
252 | #define PR_NULL PROP_TAG(PT_NULL, PROP_ID_NULL)
|
---|
253 |
|
---|
254 | #define CHANGE_PROP_TYPE(t,typ) ((0xFFFF0000 & t) | typ)
|
---|
255 |
|
---|
256 | /* Multi-valued property types */
|
---|
257 | #define PT_MV_I2 (MV_FLAG|PT_I2)
|
---|
258 | #define PT_MV_SHORT PT_MV_I2
|
---|
259 | #define PT_MV_LONG (MV_FLAG|PT_LONG)
|
---|
260 | #define PT_MV_I4 PT_MV_LONG
|
---|
261 | #define PT_MV_R4 (MV_FLAG|PT_R4)
|
---|
262 | #define PT_MV_FLOAT PT_MV_R4
|
---|
263 | #define PT_MV_DOUBLE (MV_FLAG|PT_DOUBLE)
|
---|
264 | #define PT_MV_R8 PT_MV_DOUBLE
|
---|
265 | #define PT_MV_CURRENCY (MV_FLAG|PT_CURRENCY)
|
---|
266 | #define PT_MV_APPTIME (MV_FLAG|PT_APPTIME)
|
---|
267 | #define PT_MV_SYSTIME (MV_FLAG|PT_SYSTIME)
|
---|
268 | #define PT_MV_STRING8 (MV_FLAG|PT_STRING8)
|
---|
269 | #define PT_MV_BINARY (MV_FLAG|PT_BINARY)
|
---|
270 | #define PT_MV_UNICODE (MV_FLAG|PT_UNICODE)
|
---|
271 | #define PT_MV_CLSID (MV_FLAG|PT_CLSID)
|
---|
272 | #define PT_MV_I8 (MV_FLAG|PT_I8)
|
---|
273 | #define PT_MV_LONGLONG PT_MV_I8
|
---|
274 |
|
---|
275 |
|
---|
276 | /* The property tag structure. This describes a list of columns */
|
---|
277 | typedef struct _SPropTagArray
|
---|
278 | {
|
---|
279 | ULONG cValues; /* Number of elements in aulPropTag */
|
---|
280 | ULONG aulPropTag[MAPI_DIM]; /* Property tags */
|
---|
281 | } SPropTagArray, *LPSPropTagArray;
|
---|
282 |
|
---|
283 | #define CbNewSPropTagArray(c) (offsetof(SPropTagArray,aulPropTag)+(c)*sizeof(ULONG))
|
---|
284 | #define CbSPropTagArray(p) CbNewSPropTagArray((p)->cValues)
|
---|
285 | #define SizedSPropTagArray(n,id) \
|
---|
286 | struct _SPropTagArray_##id { ULONG cValues; ULONG aulPropTag[n]; } id
|
---|
287 |
|
---|
288 | /* Multi-valued PT_APPTIME property value */
|
---|
289 | typedef struct _SAppTimeArray
|
---|
290 | {
|
---|
291 | ULONG cValues; /* Number of doubles in lpat */
|
---|
292 | double *lpat; /* Pointer to double array of length cValues */
|
---|
293 | } SAppTimeArray;
|
---|
294 |
|
---|
295 | /* PT_BINARY property value */
|
---|
296 | typedef struct _SBinary
|
---|
297 | {
|
---|
298 | ULONG cb; /* Number of bytes in lpb */
|
---|
299 | LPBYTE lpb; /* Pointer to byte array of length cb */
|
---|
300 | } SBinary, *LPSBinary;
|
---|
301 |
|
---|
302 | /* Multi-valued PT_BINARY property value */
|
---|
303 | typedef struct _SBinaryArray
|
---|
304 | {
|
---|
305 | ULONG cValues; /* Number of SBinarys in lpbin */
|
---|
306 | SBinary *lpbin; /* Pointer to SBinary array of length cValues */
|
---|
307 | } SBinaryArray;
|
---|
308 |
|
---|
309 | typedef SBinaryArray ENTRYLIST, *LPENTRYLIST;
|
---|
310 |
|
---|
311 | /* Multi-valued PT_CY property value */
|
---|
312 | typedef struct _SCurrencyArray
|
---|
313 | {
|
---|
314 | ULONG cValues; /* Number of CYs in lpcu */
|
---|
315 | CY *lpcur; /* Pointer to CY array of length cValues */
|
---|
316 | } SCurrencyArray;
|
---|
317 |
|
---|
318 | /* Multi-valued PT_SYSTIME property value */
|
---|
319 | typedef struct _SDateTimeArray
|
---|
320 | {
|
---|
321 | ULONG cValues; /* Number of FILETIMEs in lpft */
|
---|
322 | FILETIME *lpft; /* Pointer to FILETIME array of length cValues */
|
---|
323 | } SDateTimeArray;
|
---|
324 |
|
---|
325 | /* Multi-valued PT_DOUBLE property value */
|
---|
326 | typedef struct _SDoubleArray
|
---|
327 | {
|
---|
328 | ULONG cValues; /* Number of doubles in lpdbl */
|
---|
329 | double *lpdbl; /* Pointer to double array of length cValues */
|
---|
330 | } SDoubleArray;
|
---|
331 |
|
---|
332 | /* Multi-valued PT_CLSID property value */
|
---|
333 | typedef struct _SGuidArray
|
---|
334 | {
|
---|
335 | ULONG cValues; /* Number of GUIDs in lpguid */
|
---|
336 | GUID *lpguid; /* Pointer to GUID array of length cValues */
|
---|
337 | } SGuidArray;
|
---|
338 |
|
---|
339 | /* Multi-valued PT_LONGLONG property value */
|
---|
340 | typedef struct _SLargeIntegerArray
|
---|
341 | {
|
---|
342 | ULONG cValues; /* Number of long64s in lpli */
|
---|
343 | LARGE_INTEGER *lpli; /* Pointer to long64 array of length cValues */
|
---|
344 | } SLargeIntegerArray;
|
---|
345 |
|
---|
346 | /* Multi-valued PT_LONG property value */
|
---|
347 | typedef struct _SLongArray
|
---|
348 | {
|
---|
349 | ULONG cValues; /* Number of longs in lpl */
|
---|
350 | LONG *lpl; /* Pointer to long array of length cValues */
|
---|
351 | } SLongArray;
|
---|
352 |
|
---|
353 | /* Multi-valued PT_STRING8 property value */
|
---|
354 | typedef struct _SLPSTRArray
|
---|
355 | {
|
---|
356 | ULONG cValues; /* Number of Ascii strings in lppszA */
|
---|
357 | LPSTR *lppszA; /* Pointer to Ascii string array of length cValues */
|
---|
358 | } SLPSTRArray;
|
---|
359 |
|
---|
360 | /* Multi-valued PT_FLOAT property value */
|
---|
361 | typedef struct _SRealArray
|
---|
362 | {
|
---|
363 | ULONG cValues; /* Number of floats in lpflt */
|
---|
364 | float *lpflt; /* Pointer to float array of length cValues */
|
---|
365 | } SRealArray;
|
---|
366 |
|
---|
367 | /* Multi-valued PT_SHORT property value */
|
---|
368 | typedef struct _SShortArray
|
---|
369 | {
|
---|
370 | ULONG cValues; /* Number of shorts in lpb */
|
---|
371 | short int *lpi; /* Pointer to short array of length cValues */
|
---|
372 | } SShortArray;
|
---|
373 |
|
---|
374 | /* Multi-valued PT_UNICODE property value */
|
---|
375 | typedef struct _SWStringArray
|
---|
376 | {
|
---|
377 | ULONG cValues; /* Number of Unicode strings in lppszW */
|
---|
378 | LPWSTR *lppszW; /* Pointer to Unicode string array of length cValues */
|
---|
379 | } SWStringArray;
|
---|
380 |
|
---|
381 | /* A property value */
|
---|
382 | typedef union _PV
|
---|
383 | {
|
---|
384 | short int i;
|
---|
385 | LONG l;
|
---|
386 | ULONG ul;
|
---|
387 | float flt;
|
---|
388 | double dbl;
|
---|
389 | unsigned short b;
|
---|
390 | CY cur;
|
---|
391 | double at;
|
---|
392 | FILETIME ft;
|
---|
393 | LPSTR lpszA;
|
---|
394 | SBinary bin;
|
---|
395 | LPWSTR lpszW;
|
---|
396 | LPGUID lpguid;
|
---|
397 | LARGE_INTEGER li;
|
---|
398 | SShortArray MVi;
|
---|
399 | SLongArray MVl;
|
---|
400 | SRealArray MVflt;
|
---|
401 | SDoubleArray MVdbl;
|
---|
402 | SCurrencyArray MVcur;
|
---|
403 | SAppTimeArray MVat;
|
---|
404 | SDateTimeArray MVft;
|
---|
405 | SBinaryArray MVbin;
|
---|
406 | SLPSTRArray MVszA;
|
---|
407 | SWStringArray MVszW;
|
---|
408 | SGuidArray MVguid;
|
---|
409 | SLargeIntegerArray MVli;
|
---|
410 | SCODE err;
|
---|
411 | LONG x;
|
---|
412 | } __UPV;
|
---|
413 |
|
---|
414 | /* Property value structure. This is essentially a mini-Variant */
|
---|
415 | typedef struct _SPropValue
|
---|
416 | {
|
---|
417 | ULONG ulPropTag; /* The property type */
|
---|
418 | ULONG dwAlignPad; /* Alignment, treat as reserved */
|
---|
419 | union _PV Value; /* The property value */
|
---|
420 | } SPropValue, *LPSPropValue;
|
---|
421 |
|
---|
422 | /* Structure describing a table row (a collection of property values) */
|
---|
423 | typedef struct _SRow
|
---|
424 | {
|
---|
425 | ULONG ulAdrEntryPad; /* Padding, treat as reserved */
|
---|
426 | ULONG cValues; /* Count of property values in lpProbs */
|
---|
427 | LPSPropValue lpProps; /* Pointer to an array of property values of length cValues */
|
---|
428 | } SRow, *LPSRow;
|
---|
429 |
|
---|
430 | /* Structure describing a set of table rows */
|
---|
431 | typedef struct _SRowSet
|
---|
432 | {
|
---|
433 | ULONG cRows; /* Count of rows in aRow */
|
---|
434 | SRow aRow[MAPI_DIM]; /* Array of rows of length cRows */
|
---|
435 | } SRowSet, *LPSRowSet;
|
---|
436 |
|
---|
437 | #define CbNewSRowSet(c) (offsetof(SRowSet,aRow)+(c)*sizeof(SRow))
|
---|
438 | #define CbSRowSet(p) CbNewSRowSet((p)->cRows)
|
---|
439 | #define SizedSRowSet(n,id) \
|
---|
440 | struct _SRowSet_##id { ULONG cRows; SRow aRow[n]; } id
|
---|
441 |
|
---|
442 | /* Structure describing a problem with a property */
|
---|
443 | typedef struct _SPropProblem
|
---|
444 | {
|
---|
445 | ULONG ulIndex; /* Index of the property */
|
---|
446 | ULONG ulPropTag; /* Property tag of the property */
|
---|
447 | SCODE scode; /* Error code of the problem */
|
---|
448 | } SPropProblem, *LPSPropProblem;
|
---|
449 |
|
---|
450 | /* A collection of property problems */
|
---|
451 | typedef struct _SPropProblemArray
|
---|
452 | {
|
---|
453 | ULONG cProblem; /* Number of problems in aProblem */
|
---|
454 | SPropProblem aProblem[MAPI_DIM]; /* Array of problems of length cProblem */
|
---|
455 | } SPropProblemArray, *LPSPropProblemArray;
|
---|
456 |
|
---|
457 | /* FPropContainsProp flags */
|
---|
458 | #define FL_FULLSTRING 0x00000ul /* Exact string match */
|
---|
459 | #define FL_SUBSTRING 0x00001ul /* Substring match */
|
---|
460 | #define FL_PREFIX 0x00002ul /* Prefix match */
|
---|
461 | #define FL_IGNORECASE 0x10000ul /* Case insensitive */
|
---|
462 | #define FL_IGNORENONSPACE 0x20000ul /* Ignore non spacing characters */
|
---|
463 | #define FL_LOOSE 0x40000ul /* Try very hard to match */
|
---|
464 |
|
---|
465 |
|
---|
466 | /* Table types returned by IMAPITable_GetStatus() */
|
---|
467 | #define TBLTYPE_SNAPSHOT 0U /* Table is fixed at creation time and contents do not change */
|
---|
468 | #define TBLTYPE_KEYSET 1U /* Table has a fixed number of rows, but row values may change */
|
---|
469 | #define TBLTYPE_DYNAMIC 2U /* Table values and the number of rows may change */
|
---|
470 |
|
---|
471 | /* Table status returned by IMAPITable_GetStatus() */
|
---|
472 | #define TBLSTAT_COMPLETE 0U /* All operations have completed (normal status) */
|
---|
473 | #define TBLSTAT_QCHANGED 7U /* Table data has changed as expected */
|
---|
474 | #define TBLSTAT_SORTING 9U /* Table is being asynchronously sorted */
|
---|
475 | #define TBLSTAT_SORT_ERROR 10U /* An error occurred while sorting the table */
|
---|
476 | #define TBLSTAT_SETTING_COLS 11U /* Table columns are being asynchronously changed */
|
---|
477 | #define TBLSTAT_SETCOL_ERROR 13U /* An error occurred during column changing */
|
---|
478 | #define TBLSTAT_RESTRICTING 14U /* Table rows are being asynchronously restricted */
|
---|
479 | #define TBLSTAT_RESTRICT_ERROR 15U /* An error occurred during row restriction */
|
---|
480 |
|
---|
481 | /* Flags for IMAPITable operations that can be asynchronous */
|
---|
482 | #define TBL_NOWAIT 1U /* Perform the operation asynchronously */
|
---|
483 | #define TBL_BATCH 2U /* Perform the operation when the results are needed */
|
---|
484 | #define TBL_ASYNC TBL_NOWAIT /* Synonym for TBL_NOWAIT */
|
---|
485 |
|
---|
486 | /* Flags for IMAPITable_FindRow() */
|
---|
487 | #define DIR_BACKWARD 1U /* Read rows backwards from the start bookmark */
|
---|
488 |
|
---|
489 | /* Table bookmarks */
|
---|
490 | typedef ULONG BOOKMARK;
|
---|
491 |
|
---|
492 | #define BOOKMARK_BEGINNING ((BOOKMARK)0) /* The first row */
|
---|
493 | #define BOOKMARK_CURRENT ((BOOKMARK)1) /* The curent table row */
|
---|
494 | #define BOOKMARK_END ((BOOKMARK)2) /* The last row */
|
---|
495 |
|
---|
496 | /* Row restrictions */
|
---|
497 | typedef struct _SRestriction* LPSRestriction;
|
---|
498 |
|
---|
499 | typedef struct _SAndRestriction
|
---|
500 | {
|
---|
501 | ULONG cRes;
|
---|
502 | LPSRestriction lpRes;
|
---|
503 | } SAndRestriction;
|
---|
504 |
|
---|
505 | typedef struct _SBitMaskRestriction
|
---|
506 | {
|
---|
507 | ULONG relBMR;
|
---|
508 | ULONG ulPropTag;
|
---|
509 | ULONG ulMask;
|
---|
510 | } SBitMaskRestriction;
|
---|
511 |
|
---|
512 | typedef struct _SCommentRestriction
|
---|
513 | {
|
---|
514 | ULONG cValues;
|
---|
515 | LPSRestriction lpRes;
|
---|
516 | LPSPropValue lpProp;
|
---|
517 | } SCommentRestriction;
|
---|
518 |
|
---|
519 | #define RELOP_LT 0U
|
---|
520 | #define RELOP_LE 1U
|
---|
521 | #define RELOP_GT 2U
|
---|
522 | #define RELOP_GE 3U
|
---|
523 | #define RELOP_EQ 4U
|
---|
524 | #define RELOP_NE 5U
|
---|
525 | #define RELOP_RE 6U
|
---|
526 |
|
---|
527 | typedef struct _SComparePropsRestriction
|
---|
528 | {
|
---|
529 | ULONG relop;
|
---|
530 | ULONG ulPropTag1;
|
---|
531 | ULONG ulPropTag2;
|
---|
532 | } SComparePropsRestriction;
|
---|
533 |
|
---|
534 | typedef struct _SContentRestriction
|
---|
535 | {
|
---|
536 | ULONG ulFuzzyLevel;
|
---|
537 | ULONG ulPropTag;
|
---|
538 | LPSPropValue lpProp;
|
---|
539 | } SContentRestriction;
|
---|
540 |
|
---|
541 | typedef struct _SExistRestriction
|
---|
542 | {
|
---|
543 | ULONG ulReserved1;
|
---|
544 | ULONG ulPropTag;
|
---|
545 | ULONG ulReserved2;
|
---|
546 | } SExistRestriction;
|
---|
547 |
|
---|
548 | typedef struct _SNotRestriction
|
---|
549 | {
|
---|
550 | ULONG ulReserved;
|
---|
551 | LPSRestriction lpRes;
|
---|
552 | } SNotRestriction;
|
---|
553 |
|
---|
554 | typedef struct _SOrRestriction
|
---|
555 | {
|
---|
556 | ULONG cRes;
|
---|
557 | LPSRestriction lpRes;
|
---|
558 | } SOrRestriction;
|
---|
559 |
|
---|
560 | typedef struct _SPropertyRestriction
|
---|
561 | {
|
---|
562 | ULONG relop;
|
---|
563 | ULONG ulPropTag;
|
---|
564 | LPSPropValue lpProp;
|
---|
565 | } SPropertyRestriction;
|
---|
566 |
|
---|
567 | typedef struct _SSizeRestriction
|
---|
568 | {
|
---|
569 | ULONG relop;
|
---|
570 | ULONG ulPropTag;
|
---|
571 | ULONG cb;
|
---|
572 | } SSizeRestriction;
|
---|
573 |
|
---|
574 | typedef struct _SSubRestriction
|
---|
575 | {
|
---|
576 | ULONG ulSubObject;
|
---|
577 | LPSRestriction lpRes;
|
---|
578 | } SSubRestriction;
|
---|
579 |
|
---|
580 | /* Restriction types */
|
---|
581 | #define RES_AND 0U
|
---|
582 | #define RES_OR 1U
|
---|
583 | #define RES_NOT 2U
|
---|
584 | #define RES_CONTENT 3U
|
---|
585 | #define RES_PROPERTY 4U
|
---|
586 | #define RES_COMPAREPROPS 5U
|
---|
587 | #define RES_BITMASK 6U
|
---|
588 | #define RES_SIZE 7U
|
---|
589 | #define RES_EXIST 8U
|
---|
590 | #define RES_SUBRESTRICTION 9U
|
---|
591 | #define RES_COMMENT 10U
|
---|
592 |
|
---|
593 | typedef struct _SRestriction
|
---|
594 | {
|
---|
595 | ULONG rt;
|
---|
596 | union
|
---|
597 | {
|
---|
598 | SAndRestriction resAnd;
|
---|
599 | SBitMaskRestriction resBitMask;
|
---|
600 | SCommentRestriction resComment;
|
---|
601 | SComparePropsRestriction resCompareProps;
|
---|
602 | SContentRestriction resContent;
|
---|
603 | SExistRestriction resExist;
|
---|
604 | SNotRestriction resNot;
|
---|
605 | SOrRestriction resOr;
|
---|
606 | SPropertyRestriction resProperty;
|
---|
607 | SSizeRestriction resSize;
|
---|
608 | SSubRestriction resSub;
|
---|
609 | } res;
|
---|
610 | } SRestriction;
|
---|
611 |
|
---|
612 | /* Errors */
|
---|
613 | typedef struct _MAPIERROR
|
---|
614 | {
|
---|
615 | ULONG ulVersion; /* Mapi version */
|
---|
616 | #if defined (UNICODE) || defined (__WINESRC__)
|
---|
617 | LPWSTR lpszError; /* Error and component strings. These are Ascii */
|
---|
618 | LPWSTR lpszComponent; /* unless the MAPI_UNICODE flag is passed in */
|
---|
619 | #else
|
---|
620 | LPSTR lpszError;
|
---|
621 | LPSTR lpszComponent;
|
---|
622 | #endif
|
---|
623 | ULONG ulLowLevelError;
|
---|
624 | ULONG ulContext;
|
---|
625 | } MAPIERROR, *LPMAPIERROR;
|
---|
626 |
|
---|
627 | /* Sorting */
|
---|
628 | #define TABLE_SORT_ASCEND 0U
|
---|
629 | #define TABLE_SORT_DESCEND 1U
|
---|
630 | #define TABLE_SORT_COMBINE 2U
|
---|
631 |
|
---|
632 | typedef struct _SSortOrder
|
---|
633 | {
|
---|
634 | ULONG ulPropTag;
|
---|
635 | ULONG ulOrder;
|
---|
636 | } SSortOrder, *LPSSortOrder;
|
---|
637 |
|
---|
638 | typedef struct _SSortOrderSet
|
---|
639 | {
|
---|
640 | ULONG cSorts;
|
---|
641 | ULONG cCategories;
|
---|
642 | ULONG cExpanded;
|
---|
643 | SSortOrder aSort[MAPI_DIM];
|
---|
644 | } SSortOrderSet, * LPSSortOrderSet;
|
---|
645 |
|
---|
646 | #define MNID_ID 0
|
---|
647 | #define MNID_STRING 1
|
---|
648 |
|
---|
649 | typedef struct _MAPINAMEID
|
---|
650 | {
|
---|
651 | LPGUID lpguid;
|
---|
652 | ULONG ulKind;
|
---|
653 | union
|
---|
654 | {
|
---|
655 | LONG lID;
|
---|
656 | LPWSTR lpwstrName;
|
---|
657 | } Kind;
|
---|
658 | } MAPINAMEID, *LPMAPINAMEID;
|
---|
659 |
|
---|
660 | /* Desired notification types (bitflags) */
|
---|
661 | #define fnevCriticalError 0x00000001UL
|
---|
662 | #define fnevNewMail 0x00000002UL
|
---|
663 | #define fnevObjectCreated 0x00000004UL
|
---|
664 | #define fnevObjectDeleted 0x00000008UL
|
---|
665 | #define fnevObjectModified 0x00000010UL
|
---|
666 | #define fnevObjectMoved 0x00000020UL
|
---|
667 | #define fnevObjectCopied 0x00000040UL
|
---|
668 | #define fnevSearchComplete 0x00000080UL
|
---|
669 | #define fnevTableModified 0x00000100UL
|
---|
670 | #define fnevStatusObjectModified 0x00000200UL
|
---|
671 | #define fnevReservedForMapi 0x40000000UL
|
---|
672 | #define fnevExtended 0x80000000UL
|
---|
673 |
|
---|
674 | /* Type of notification event */
|
---|
675 | #define TABLE_CHANGED 1U
|
---|
676 | #define TABLE_ERROR 2U
|
---|
677 | #define TABLE_ROW_ADDED 3U
|
---|
678 | #define TABLE_ROW_DELETED 4U
|
---|
679 | #define TABLE_ROW_MODIFIED 5U
|
---|
680 | #define TABLE_SORT_DONE 6U
|
---|
681 | #define TABLE_RESTRICT_DONE 7U
|
---|
682 | #define TABLE_SETCOL_DONE 8U
|
---|
683 | #define TABLE_RELOAD 9U
|
---|
684 |
|
---|
685 | /* fnevCriticalError notification */
|
---|
686 | typedef struct _ERROR_NOTIFICATION
|
---|
687 | {
|
---|
688 | ULONG cbEntryID;
|
---|
689 | LPENTRYID lpEntryID;
|
---|
690 | SCODE scode;
|
---|
691 | ULONG ulFlags;
|
---|
692 | LPMAPIERROR lpMAPIError;
|
---|
693 | } ERROR_NOTIFICATION;
|
---|
694 |
|
---|
695 | /* fnevNewMail notification */
|
---|
696 | typedef struct _NEWMAIL_NOTIFICATION
|
---|
697 | {
|
---|
698 | ULONG cbEntryID;
|
---|
699 | LPENTRYID lpEntryID;
|
---|
700 | ULONG cbParentID;
|
---|
701 | LPENTRYID lpParentID;
|
---|
702 | ULONG ulFlags;
|
---|
703 | #if defined (UNICODE) || defined (__WINESRC__)
|
---|
704 | LPWSTR lpszMessageClass;
|
---|
705 | #else
|
---|
706 | LPSTR lpszMessageClass;
|
---|
707 | #endif
|
---|
708 | ULONG ulMessageFlags;
|
---|
709 | } NEWMAIL_NOTIFICATION;
|
---|
710 |
|
---|
711 | /* fnevObjectCreated/Deleted/Modified/Moved/Copied notification */
|
---|
712 | typedef struct _OBJECT_NOTIFICATION
|
---|
713 | {
|
---|
714 | ULONG cbEntryID;
|
---|
715 | LPENTRYID lpEntryID;
|
---|
716 | ULONG ulObjType;
|
---|
717 | ULONG cbParentID;
|
---|
718 | LPENTRYID lpParentID;
|
---|
719 | ULONG cbOldID;
|
---|
720 | LPENTRYID lpOldID;
|
---|
721 | ULONG cbOldParentID;
|
---|
722 | LPENTRYID lpOldParentID;
|
---|
723 | LPSPropTagArray lpPropTagArray;
|
---|
724 | } OBJECT_NOTIFICATION;
|
---|
725 |
|
---|
726 | /* fnevTableModified notification */
|
---|
727 | typedef struct _TABLE_NOTIFICATION
|
---|
728 | {
|
---|
729 | ULONG ulTableEvent;
|
---|
730 | HRESULT hResult;
|
---|
731 | SPropValue propIndex;
|
---|
732 | SPropValue propPrior;
|
---|
733 | SRow row;
|
---|
734 | ULONG ulPad;
|
---|
735 | } TABLE_NOTIFICATION;
|
---|
736 |
|
---|
737 | /* fnevExtended notification */
|
---|
738 | typedef struct _EXTENDED_NOTIFICATION
|
---|
739 | {
|
---|
740 | ULONG ulEvent;
|
---|
741 | ULONG cb;
|
---|
742 | LPBYTE pbEventParameters;
|
---|
743 | } EXTENDED_NOTIFICATION;
|
---|
744 |
|
---|
745 | /* fnevStatusObjectModified notification */
|
---|
746 | typedef struct
|
---|
747 | {
|
---|
748 | ULONG cbEntryID;
|
---|
749 | LPENTRYID lpEntryID;
|
---|
750 | ULONG cValues;
|
---|
751 | LPSPropValue lpPropVals;
|
---|
752 | } STATUS_OBJECT_NOTIFICATION;
|
---|
753 |
|
---|
754 | /* The notification structure passed to advise sinks */
|
---|
755 | typedef struct _NOTIFICATION
|
---|
756 | {
|
---|
757 | ULONG ulEventType;
|
---|
758 | ULONG ulAlignPad;
|
---|
759 | union
|
---|
760 | {
|
---|
761 | ERROR_NOTIFICATION err;
|
---|
762 | NEWMAIL_NOTIFICATION newmail;
|
---|
763 | OBJECT_NOTIFICATION obj;
|
---|
764 | TABLE_NOTIFICATION tab;
|
---|
765 | EXTENDED_NOTIFICATION ext;
|
---|
766 | STATUS_OBJECT_NOTIFICATION statobj;
|
---|
767 | } info;
|
---|
768 | } NOTIFICATION, *LPNOTIFICATION;
|
---|
769 |
|
---|
770 | typedef LONG (WINAPI NOTIFCALLBACK)(LPVOID,ULONG,LPNOTIFICATION);
|
---|
771 | typedef NOTIFCALLBACK *LPNOTIFCALLBACK;
|
---|
772 |
|
---|
773 | /*****************************************************************************
|
---|
774 | * IMAPITable interface
|
---|
775 | *
|
---|
776 | * This is the read-only 'view' over an I(MAPI)TableData object.
|
---|
777 | */
|
---|
778 | #define INTERFACE IMAPITable
|
---|
779 | DECLARE_INTERFACE_(IMAPITable,IUnknown)
|
---|
780 | {
|
---|
781 | /*** IUnknown methods ***/
|
---|
782 | STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
|
---|
783 | STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
---|
784 | STDMETHOD_(ULONG,Release)(THIS) PURE;
|
---|
785 | /*** IMAPITable methods ***/
|
---|
786 | STDMETHOD(GetLastError)(THIS_ HRESULT hRes, ULONG ulFlags, LPMAPIERROR *lppError) PURE;
|
---|
787 | STDMETHOD(Advise)(THIS_ ULONG ulMask, LPMAPIADVISESINK lpSink, ULONG *lpCxn) PURE;
|
---|
788 | STDMETHOD(Unadvise)(THIS_ ULONG ulCxn) PURE;
|
---|
789 | STDMETHOD(GetStatus)(THIS_ ULONG *lpStatus, ULONG *lpType) PURE;
|
---|
790 | STDMETHOD(SetColumns)(THIS_ LPSPropTagArray lpProps, ULONG ulFlags) PURE;
|
---|
791 | STDMETHOD(QueryColumns)(THIS_ ULONG ulFlags, LPSPropTagArray *lpCols) PURE;
|
---|
792 | STDMETHOD(GetRowCount)(THIS_ ULONG ulFlags, ULONG *lpCount) PURE;
|
---|
793 | STDMETHOD(SeekRow)(THIS_ BOOKMARK lpStart, LONG lRows, LONG *lpSeeked) PURE;
|
---|
794 | STDMETHOD(SeekRowApprox)(THIS_ ULONG ulNum, ULONG ulDenom) PURE;
|
---|
795 | STDMETHOD(QueryPosition)(THIS_ ULONG *lpRow, ULONG *lpNum, ULONG *lpDenom) PURE;
|
---|
796 | STDMETHOD(FindRow)(THIS_ LPSRestriction lpRestrict, BOOKMARK lpOrigin, ULONG ulFlags) PURE;
|
---|
797 | STDMETHOD(Restrict)(THIS_ LPSRestriction lpRestrict, ULONG ulFlags) PURE;
|
---|
798 | STDMETHOD(CreateBookmark)(THIS_ BOOKMARK *lppPos) PURE;
|
---|
799 | STDMETHOD(FreeBookmark)(THIS_ BOOKMARK lpPos) PURE;
|
---|
800 | STDMETHOD(SortTable)(THIS_ LPSSortOrderSet lpSortOpts, ULONG ulFlags) PURE;
|
---|
801 | STDMETHOD(QuerySortOrder)(THIS_ LPSSortOrderSet *lppSortOpts) PURE;
|
---|
802 | STDMETHOD(QueryRows)(THIS_ LONG lRows, ULONG ulFlags, LPSRowSet *lppRows) PURE;
|
---|
803 | STDMETHOD(Abort) (THIS) PURE;
|
---|
804 | STDMETHOD(ExpandRow)(THIS_ ULONG cbKey, LPBYTE lpKey, ULONG ulRows,
|
---|
805 | ULONG ulFlags, LPSRowSet *lppRows, ULONG *lpMore) PURE;
|
---|
806 | STDMETHOD(CollapseRow)(THIS_ ULONG cbKey, LPBYTE lpKey, ULONG ulFlags, ULONG *lpRows) PURE;
|
---|
807 | STDMETHOD(WaitForCompletion)(THIS_ ULONG ulFlags, ULONG ulTime, ULONG *lpState) PURE;
|
---|
808 | STDMETHOD(GetCollapseState)(THIS_ ULONG ulFlags, ULONG cbKey, LPBYTE lpKey,
|
---|
809 | ULONG *lpStateLen, LPBYTE *lpState) PURE;
|
---|
810 | STDMETHOD(SetCollapseState)(THIS_ ULONG ulFlags, ULONG ulLen,
|
---|
811 | LPBYTE lpStart, BOOKMARK *lppWhere) PURE;
|
---|
812 | };
|
---|
813 | #undef INTERFACE
|
---|
814 |
|
---|
815 | #if !defined(__cplusplus) || defined(CINTERFACE)
|
---|
816 | /*** IUnknown methods ***/
|
---|
817 | #define IMAPITable_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
---|
818 | #define IMAPITable_AddRef(p) (p)->lpVtbl->AddRef(p)
|
---|
819 | #define IMAPITable_Release(p) (p)->lpVtbl->Release(p)
|
---|
820 | /*** IMAPITable methods ***/
|
---|
821 | #define IMAPITable_GetLastError(p,a,b,c) (p)->lpVtbl->GetLastError(p,a,b,c)
|
---|
822 | #define IMAPITable_Advise(p,a,b,c) (p)->lpVtbl->Advise(p,a,b,c)
|
---|
823 | #define IMAPITable_Unadvise(p,a) (p)->lpVtbl->Unadvise(p,a)
|
---|
824 | #define IMAPITable_GetStatus(p,a,b) (p)->lpVtbl->GetStatus(p,a,b)
|
---|
825 | #define IMAPITable_SetColumns(p,a,b) (p)->lpVtbl->SetColumns(p,a,b)
|
---|
826 | #define IMAPITable_QueryColumns(p,a,b) (p)->lpVtbl->QueryColumns(p,a,b)
|
---|
827 | #define IMAPITable_GetRowCount(p,a,b) (p)->lpVtbl->GetRowCount(p,a,b)
|
---|
828 | #define IMAPITable_SeekRow(p,a,b) (p)->lpVtbl->SeekRow(p,a,b)
|
---|
829 | #define IMAPITable_SeekRowApprox(p,a,b) (p)->lpVtbl->SeekRowApprox(p,a,b)
|
---|
830 | #define IMAPITable_QueryPosition(p,a,b) (p)->lpVtbl->QueryPosition(p,a,b)
|
---|
831 | #define IMAPITable_FindRow(p,a,b,c) (p)->lpVtbl->FindRow(p,a,b,c)
|
---|
832 | #define IMAPITable_Restrict(p,a,b) (p)->lpVtbl->Recstrict(p,a,b)
|
---|
833 | #define IMAPITable_CreateBookmark(p,a) (p)->lpVtbl->CreateBookmark(p,a)
|
---|
834 | #define IMAPITable_FreeBookmark(p,a) (p)->lpVtbl->FreeBookmark(p,a)
|
---|
835 | #define IMAPITable_SortTable(p,a,b) (p)->lpVtbl->SortTable(p,a,b)
|
---|
836 | #define IMAPITable_QuerySortOrder(p,a) (p)->lpVtbl->QuerySortOrder(p,a)
|
---|
837 | #define IMAPITable_QueryRows(p,a,b,c) (p)->lpVtbl->QueryRows(p,a,b,c)
|
---|
838 | #define IMAPITable_Abort(p) (p)->lpVtbl->Abort(p)
|
---|
839 | #define IMAPITable_ExpandRow(p,a,b,c,d,e,f) (p)->lpVtbl->ExpandRow(p,a,b,c,d,e,f)
|
---|
840 | #define IMAPITable_CollapseRow(p,a,b,c,d) (p)->lpVtbl->CollapseRow(p,a,b,c,d)
|
---|
841 | #define IMAPITable_WaitForCompletion(p,a,b,c) (p)->lpVtbl->WaitForCompletion(p,a,b,c)
|
---|
842 | #define IMAPITable_GetCollapseState(p,a,b,c,d,e) (p)->lpVtbl->GetCollapseState(p,a,b,c,d,e)
|
---|
843 | #define IMAPITable_SetCollapseState(p,a,b,c,d) (p)->lpVtbl->SetCollapseState(p,a,b,c,d)
|
---|
844 | #endif
|
---|
845 |
|
---|
846 | typedef IMAPITable *LPMAPITABLE;
|
---|
847 |
|
---|
848 | /*****************************************************************************
|
---|
849 | * IMAPIAdviseSink interface
|
---|
850 | */
|
---|
851 | #define INTERFACE IMAPIAdviseSink
|
---|
852 | DECLARE_INTERFACE_(IMAPIAdviseSink,IUnknown)
|
---|
853 | {
|
---|
854 | /*** IUnknown methods ***/
|
---|
855 | STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
|
---|
856 | STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
---|
857 | STDMETHOD_(ULONG,Release)(THIS) PURE;
|
---|
858 | /*** IMAPIAdviseSink methods ***/
|
---|
859 | STDMETHOD(OnNotify)(THIS_ ULONG NumNotif, LPNOTIFICATION lpNotif) PURE;
|
---|
860 | };
|
---|
861 | #undef INTERFACE
|
---|
862 |
|
---|
863 | #if !defined(__cplusplus) || defined(CINTERFACE)
|
---|
864 | /*** IUnknown methods ***/
|
---|
865 | #define IMAPIAdviseSink_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
---|
866 | #define IMAPIAdviseSink_AddRef(p) (p)->lpVtbl->AddRef(p)
|
---|
867 | #define IMAPIAdviseSink_Release(p) (p)->lpVtbl->Release(p)
|
---|
868 | /*** IMAPIAdviseSink methods ***/
|
---|
869 | #define IMAPIAdviseSink_OnNotify(p,a,b) (p)->lpVtbl->OnNotify(p,a,b)
|
---|
870 | #endif
|
---|
871 |
|
---|
872 | /*****************************************************************************
|
---|
873 | * IMAPIProp interface
|
---|
874 | */
|
---|
875 | #define INTERFACE IMAPIProp
|
---|
876 | DECLARE_INTERFACE_(IMAPIProp,IUnknown)
|
---|
877 | {
|
---|
878 | /*** IUnknown methods ***/
|
---|
879 | STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
|
---|
880 | STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
---|
881 | STDMETHOD_(ULONG,Release)(THIS) PURE;
|
---|
882 | /*** IMAPIProp methods ***/
|
---|
883 | STDMETHOD(GetLastError)(THIS_ HRESULT hRes, ULONG ulFlags, LPMAPIERROR *lppErr) PURE;
|
---|
884 | STDMETHOD(SaveChanges)(THIS_ ULONG ulFlags) PURE;
|
---|
885 | STDMETHOD(GetProps)(THIS_ LPSPropTagArray lpPropTags, ULONG ulFlags, ULONG *lpValues, LPSPropValue *lppProps) PURE;
|
---|
886 | STDMETHOD(GetPropList)(THIS_ ULONG ulFlags, LPSPropTagArray *lppPropTagArray) PURE;
|
---|
887 | STDMETHOD(OpenProperty)(THIS_ ULONG ulPropTag, LPCIID lpIid, ULONG ulOpts, ULONG ulFlags, LPUNKNOWN *lppUnk) PURE;
|
---|
888 | STDMETHOD(SetProps)(THIS_ ULONG cValues, LPSPropValue lpProps, LPSPropProblemArray *lppProbs) PURE;
|
---|
889 | STDMETHOD(DeleteProps)(THIS_ LPSPropTagArray lpPropTags, LPSPropProblemArray *lppProbs) PURE;
|
---|
890 | STDMETHOD(CopyTo)(THIS_ ULONG ciidExclude, LPCIID lpIid, LPSPropTagArray lpProps, ULONG ulParam,
|
---|
891 | LPMAPIPROGRESS lpProgress, LPCIID lpIface,LPVOID lpDest, ULONG ulFlags,
|
---|
892 | LPSPropProblemArray *lppProbs) PURE;
|
---|
893 | STDMETHOD(CopyProps)(THIS_ LPSPropTagArray lpIncludeProps, ULONG ulParam, LPMAPIPROGRESS lpProgress,
|
---|
894 | LPCIID lpIid, LPVOID lpDestObj, ULONG ulFlags, LPSPropProblemArray *lppProblems) PURE;
|
---|
895 | STDMETHOD(GetNamesFromIDs)(THIS_ LPSPropTagArray *lppPropTags, LPGUID lpIid, ULONG ulFlags, ULONG *lpCount,
|
---|
896 | LPMAPINAMEID **lpppNames) PURE;
|
---|
897 | STDMETHOD(GetIDsFromNames)(THIS_ ULONG cPropNames, LPMAPINAMEID *lppNames, ULONG ulFlags, LPSPropTagArray *lppPropTags) PURE;
|
---|
898 | };
|
---|
899 | #undef INTERFACE
|
---|
900 |
|
---|
901 | #if !defined(__cplusplus) || defined(CINTERFACE)
|
---|
902 | /*** IUnknown methods ***/
|
---|
903 | #define IMAPIProp_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
---|
904 | #define IMAPIProp_AddRef(p) (p)->lpVtbl->AddRef(p)
|
---|
905 | #define IMAPIProp_Release(p) (p)->lpVtbl->Release(p)
|
---|
906 | /*** IMAPIProp methods ***/
|
---|
907 | #define IMAPIProp_GetLastError(p,a,b,c) (p)->lpVtbl->GetLastError(p,a,b,c)
|
---|
908 | #define IMAPIProp_SaveChanges(p,a) (p)->lpVtbl->SaveChanges(p,a)
|
---|
909 | #define IMAPIProp_GetProps(p,a,b,c,d) (p)->lpVtbl->GetProps(p,a,b,c,d)
|
---|
910 | #define IMAPIProp_GetPropList(p,a,b) (p)->lpVtbl->GetPropList(p,a,b)
|
---|
911 | #define IMAPIProp_OpenProperty(p,a,b,c,d,e) (p)->lpVtbl->OpenProperty(p,a,b,c,d,e)
|
---|
912 | #define IMAPIProp_SetProps(p,a,b,c) (p)->lpVtbl->SetProps(p,a,b,c)
|
---|
913 | #define IMAPIProp_DeleteProps(p,a,b) (p)->lpVtbl->DeleteProps(p,a,b)
|
---|
914 | #define IMAPIProp_CopyTo(p,a,b,c,d,e,f,g,h,i) (p)->lpVtbl->CopyTo(p,a,b,c,d,e,f,g,h,i)
|
---|
915 | #define IMAPIProp_CopyProps(p,a,b,c,d,e,f,g) (p)->lpVtbl->CopyProps(p,a,b,c,d,e,f,g)
|
---|
916 | #define IMAPIProp_GetNamesFromIDs(p,a,b,c,d,e) (p)->lpVtbl->GetNamesFromIDs(p,a,b,c,d,e)
|
---|
917 | #define IMAPIProp_GetIDsFromNames(p,a,b,c,d) (p)->lpVtbl->GetIDsFromNames(p,a,b,c,d)
|
---|
918 | #endif
|
---|
919 |
|
---|
920 | typedef IMAPIProp *LPMAPIPROP;
|
---|
921 |
|
---|
922 | typedef struct
|
---|
923 | {
|
---|
924 | ULONG cb;
|
---|
925 | BYTE abEntry[MAPI_DIM];
|
---|
926 | } FLATENTRY, *LPFLATENTRY;
|
---|
927 |
|
---|
928 | typedef struct
|
---|
929 | {
|
---|
930 | ULONG cEntries;
|
---|
931 | ULONG cbEntries;
|
---|
932 | BYTE abEntries[MAPI_DIM];
|
---|
933 | } FLATENTRYLIST, *LPFLATENTRYLIST;
|
---|
934 |
|
---|
935 | typedef struct
|
---|
936 | {
|
---|
937 | ULONG cb;
|
---|
938 | BYTE ab[MAPI_DIM];
|
---|
939 | } MTSID, *LPMTSID;
|
---|
940 |
|
---|
941 | typedef struct
|
---|
942 | {
|
---|
943 | ULONG cMTSIDs;
|
---|
944 | ULONG cbMTSIDs;
|
---|
945 | BYTE abMTSIDs[MAPI_DIM];
|
---|
946 | } FLATMTSIDLIST, *LPFLATMTSIDLIST;
|
---|
947 |
|
---|
948 | typedef struct _ADRENTRY
|
---|
949 | {
|
---|
950 | ULONG ulReserved1;
|
---|
951 | ULONG cValues;
|
---|
952 | LPSPropValue rgPropVals;
|
---|
953 | } ADRENTRY, *LPADRENTRY;
|
---|
954 |
|
---|
955 | typedef struct _ADRLIST
|
---|
956 | {
|
---|
957 | ULONG cEntries;
|
---|
958 | ADRENTRY aEntries[MAPI_DIM];
|
---|
959 | } ADRLIST, *LPADRLIST;
|
---|
960 |
|
---|
961 | #endif /*MAPIDEFS_H*/
|
---|