2 * Copyright (C) 1998 Justin Bradford
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 /* Some types from other headers */
34 typedef ULONG_PTR LHANDLE, *LPLHANDLE;
37 #ifndef _tagCY_DEFINED
38 #define _tagCY_DEFINED
43 #ifdef WORDS_BIGENDIAN
54 #endif /* _tagCY_DEFINED */
59 typedef struct _FILETIME
63 } FILETIME, *PFILETIME, *LPFILETIME;
66 /* Memory allocation routines */
67 typedef SCODE (WINAPI ALLOCATEBUFFER)(ULONG,LPVOID*);
68 typedef SCODE (WINAPI ALLOCATEMORE)(ULONG,LPVOID,LPVOID*);
69 typedef ULONG (WINAPI FREEBUFFER)(LPVOID);
71 typedef ALLOCATEBUFFER *LPALLOCATEBUFFER;
72 typedef ALLOCATEMORE *LPALLOCATEMORE;
73 typedef FREEBUFFER *LPFREEBUFFER;
75 /* MAPI exposed interfaces */
76 typedef const IID *LPCIID;
78 typedef struct IAddrBook IAddrBook;
79 typedef IAddrBook *LPADRBOOK;
80 typedef struct IABContainer IABContainer;
81 typedef IABContainer *LPABCONT;
82 typedef struct IAttach IAttach;
83 typedef IAttach *LPATTACH;
84 typedef struct IDistList IDistList;
85 typedef IDistList *LPDISTLIST;
86 typedef struct IMailUser IMailUser;
87 typedef IMailUser *LPMAILUSER;
88 typedef struct IMAPIAdviseSink IMAPIAdviseSink;
89 typedef IMAPIAdviseSink *LPMAPIADVISESINK;
90 typedef struct IMAPIContainer IMAPIContainer;
91 typedef IMAPIContainer *LPMAPICONTAINER;
92 typedef struct IMAPIFolder IMAPIFolder;
93 typedef IMAPIFolder *LPMAPIFOLDER;
94 typedef struct IMAPIProgress IMAPIProgress;
95 typedef IMAPIProgress *LPMAPIPROGRESS;
96 typedef struct IMAPIProp IMAPIProp;
97 typedef IMAPIProp *LPMAPIPROP;
98 typedef struct IMAPIStatus IMAPIStatus;
99 typedef IMAPIStatus *LPMAPISTATUS;
100 typedef struct IMAPITable IMAPITable;
101 typedef IMAPITable *LPMAPITABLE;
102 typedef struct IMessage IMessage;
103 typedef IMessage *LPMESSAGE;
104 typedef struct IMsgStore IMsgStore;
105 typedef IMsgStore *LPMDB;
106 typedef struct IProfSect IProfSect;
107 typedef IProfSect *LPPROFSECT;
108 typedef struct IProviderAdmin IProviderAdmin;
109 typedef IProviderAdmin *LPPROVIDERADMIN;
112 # define MAPI_DIM 1 /* Default to one dimension for variable length arrays */
115 /* Flags for abFlags[0] */
116 #define MAPI_NOTRESERVED 0x08
117 #define MAPI_NOW 0x10
118 #define MAPI_THISSESSION 0x20
119 #define MAPI_NOTRECIP 0x40
120 #define MAPI_SHORTTERM 0x80
122 /* Flags for abFlags[1] */
123 #define MAPI_COMPOUND 0x80
125 typedef struct _ENTRYID
129 } ENTRYID, *LPENTRYID;
132 typedef struct _MAPIUID
134 BYTE ab[sizeof(GUID)];
135 } MAPIUID, *LPMAPIUID;
137 #define IsEqualMAPIUID(pl,pr) (!memcmp((pl),(pr),sizeof(MAPIUID)))
139 #define MAPI_ONE_OFF_UID { 0x81,0x2b,0x1f,0xa4,0xbe,0xa3,0x10,0x19,0x9d,0x6e, \
140 0x00,0xdd,0x01,0x0f,0x54,0x02 }
141 #define MAPI_ONE_OFF_UNICODE 0x8000
142 #define MAPI_ONE_OFF_NO_RICH_INFO 0x0001
145 #define MAPI_STORE 1U
146 #define MAPI_ADDRBOOK 2U
147 #define MAPI_FOLDER 3U
148 #define MAPI_ABCONT 4U
149 #define MAPI_MESSAGE 5U
150 #define MAPI_MAILUSER 6U
151 #define MAPI_ATTACH 7U
152 #define MAPI_DISTLIST 8U
153 #define MAPI_PROFSECT 9U
154 #define MAPI_STATUS 10U
155 #define MAPI_SESSION 11U
156 #define MAPI_FORMINFO 12U
158 /* Flags for various calls */
159 #define MAPI_MODIFY 0x00000001U /* Object can be modified */
160 #define MAPI_ACCESS_MODIFY MAPI_MODIFY /* Want write access */
161 #define MAPI_ACCESS_READ 0x00000002U /* Want read access */
162 #define MAPI_ACCESS_DELETE 0x00000004U /* Want delete access */
163 #define MAPI_ACCESS_CREATE_HIERARCHY 0x00000008U
164 #define MAPI_ACCESS_CREATE_CONTENTS 0x00000010U
165 #define MAPI_ACCESS_CREATE_ASSOCIATED 0x00000020U
166 #define MAPI_UNICODE 0x80000000U /* Strings in this call are Unicode */
168 #if defined (UNICODE) || defined (__WINESRC__)
169 #define fMapiUnicode MAPI_UNICODE
171 #define fMapiUnicode 0U
174 /* Types of message receivers */
176 #define MAPI_ORIG 0 /* The original author */
177 #define MAPI_TO 1 /* The primary message receiver */
178 #define MAPI_CC 2 /* A carbon copy receiver */
179 #define MAPI_BCC 3 /* A blind carbon copy receiver */
180 #define MAPI_P1 0x10000000 /* A message resend */
181 #define MAPI_SUBMITTED 0x80000000 /* This message has already been sent */
184 #ifndef cchProfileNameMax
185 #define cchProfileNameMax 64 /* Maximum length of a profile name */
186 #define cchProfilePassMax 64 /* Maximum length of a profile password */
189 /* Properties: The are the contents of cells in MAPI tables, as well as the
190 * values returned when object properties are queried.
194 #define PT_UNSPECIFIED 0U
197 #define PT_SHORT PT_I2
199 #define PT_I4 PT_LONG
201 #define PT_FLOAT PT_R4
203 #define PT_R8 PT_DOUBLE
204 #define PT_CURRENCY 6U
205 #define PT_APPTIME 7U
207 #define PT_BOOLEAN 11U
208 #define PT_OBJECT 13U
210 #define PT_LONGLONG PT_I8
211 #define PT_STRING8 30U
212 #define PT_UNICODE 31U
213 #define PT_SYSTIME 64U
215 #define PT_BINARY 258U
217 #define MV_FLAG 0x1000 /* This property type is multi-valued (an array) */
218 #define MV_INSTANCE 0x2000
219 #define MVI_FLAG (MV_FLAG|MV_INSTANCE)
220 #define MVI_PROP(t) ((t)|MVI_FLAG)
224 # define PT_TSTRING PT_UNICODE
225 # define PT_MV_TSTRING (MV_FLAG|PT_UNICODE)
227 # define LPPSZ lppszW
230 # define PT_TSTRING PT_STRING8
231 # define PT_MV_TSTRING (MV_FLAG|PT_STRING8)
233 # define LPPSZ lppszA
238 #define PROP_TYPE_MASK 0xFFFFU
239 #define PROP_TYPE(t) ((t) & PROP_TYPE_MASK)
240 #define PROP_ID(t) ((t) >> 16)
241 #define PROP_TAG(t,id) (((id) << 16) | t)
242 #define PROP_ID_NULL 0
243 #define PROP_ID_INVALID 0xFFFF
244 #define PR_NULL PROP_TAG(PT_NULL, PROP_ID_NULL)
246 #define CHANGE_PROP_TYPE(t,typ) ((0xFFFF0000 & t) | typ)
248 /* Multi-valued property types */
249 #define PT_MV_I2 (MV_FLAG|PT_I2)
250 #define PT_MV_SHORT PT_MV_I2
251 #define PT_MV_LONG (MV_FLAG|PT_LONG)
252 #define PT_MV_I4 PT_MV_LONG
253 #define PT_MV_R4 (MV_FLAG|PT_R4)
254 #define PT_MV_FLOAT PT_MV_R4
255 #define PT_MV_DOUBLE (MV_FLAG|PT_DOUBLE)
256 #define PT_MV_R8 PT_MV_DOUBLE
257 #define PT_MV_CURRENCY (MV_FLAG|PT_CURRENCY)
258 #define PT_MV_APPTIME (MV_FLAG|PT_APPTIME)
259 #define PT_MV_SYSTIME (MV_FLAG|PT_SYSTIME)
260 #define PT_MV_STRING8 (MV_FLAG|PT_STRING8)
261 #define PT_MV_BINARY (MV_FLAG|PT_BINARY)
262 #define PT_MV_UNICODE (MV_FLAG|PT_UNICODE)
263 #define PT_MV_CLSID (MV_FLAG|PT_CLSID)
264 #define PT_MV_I8 (MV_FLAG|PT_I8)
265 #define PT_MV_LONGLONG PT_MV_I8
268 /* The property tag structure. This describes a list of columns */
269 typedef struct _SPropTagArray
271 ULONG cValues; /* Number of elements in aulPropTag */
272 ULONG aulPropTag[MAPI_DIM]; /* Property tags */
273 } SPropTagArray, *LPSPropTagArray;
275 #define CbNewSPropTagArray(c) (offsetof(SPropTagArray,aulPropTag)+(c)*sizeof(ULONG))
276 #define CbSPropTagArray(p) CbNewSPropTagArray((p)->cValues)
277 #define SizedSPropTagArray(n,id) \
278 struct _SPropTagArray_##id { ULONG cValues; ULONG aulPropTag[n]; } id
280 /* Multi-valued PT_APPTIME property value */
281 typedef struct _SAppTimeArray
283 ULONG cValues; /* Number of doubles in lpat */
284 double *lpat; /* Pointer to double array of length cValues */
287 /* PT_BINARY property value */
288 typedef struct _SBinary
290 ULONG cb; /* Number of bytes in lpb */
291 LPBYTE lpb; /* Pointer to byte array of length cb */
292 } SBinary, *LPSBinary;
294 /* Multi-valued PT_BINARY property value */
295 typedef struct _SBinaryArray
297 ULONG cValues; /* Number of SBinarys in lpbin */
298 SBinary *lpbin; /* Pointer to SBinary array of length cValues */
301 typedef SBinaryArray ENTRYLIST, *LPENTRYLIST;
303 /* Multi-valued PT_CY property value */
304 typedef struct _SCurrencyArray
306 ULONG cValues; /* Number of CYs in lpcu */
307 CY *lpcur; /* Pointer to CY array of length cValues */
310 /* Multi-valued PT_SYSTIME property value */
311 typedef struct _SDateTimeArray
313 ULONG cValues; /* Number of FILETIMEs in lpft */
314 FILETIME *lpft; /* Pointer to FILETIME array of length cValues */
317 /* Multi-valued PT_DOUBLE property value */
318 typedef struct _SDoubleArray
320 ULONG cValues; /* Number of doubles in lpdbl */
321 double *lpdbl; /* Pointer to double array of length cValues */
324 /* Multi-valued PT_CLSID property value */
325 typedef struct _SGuidArray
327 ULONG cValues; /* Number of GUIDs in lpguid */
328 GUID *lpguid; /* Pointer to GUID array of length cValues */
331 /* Multi-valued PT_LONGLONG property value */
332 typedef struct _SLargeIntegerArray
334 ULONG cValues; /* Number of long64s in lpli */
335 LARGE_INTEGER *lpli; /* Pointer to long64 array of length cValues */
336 } SLargeIntegerArray;
338 /* Multi-valued PT_LONG property value */
339 typedef struct _SLongArray
341 ULONG cValues; /* Number of longs in lpl */
342 LONG *lpl; /* Pointer to long array of length cValues */
345 /* Multi-valued PT_STRING8 property value */
346 typedef struct _SLPSTRArray
348 ULONG cValues; /* Number of Ascii strings in lppszA */
349 LPSTR *lppszA; /* Pointer to Ascii string array of length cValues */
352 /* Multi-valued PT_FLOAT property value */
353 typedef struct _SRealArray
355 ULONG cValues; /* Number of floats in lpflt */
356 float *lpflt; /* Pointer to float array of length cValues */
359 /* Multi-valued PT_SHORT property value */
360 typedef struct _SShortArray
362 ULONG cValues; /* Number of shorts in lpb */
363 short int *lpi; /* Pointer to short array of length cValues */
366 /* Multi-valued PT_UNICODE property value */
367 typedef struct _SWStringArray
369 ULONG cValues; /* Number of Unicode strings in lppszW */
370 LPWSTR *lppszW; /* Pointer to Unicode string array of length cValues */
373 /* A property value */
394 SCurrencyArray MVcur;
401 SLargeIntegerArray MVli;
406 /* Property value structure. This is essentially a mini-Variant */
407 typedef struct _SPropValue
409 ULONG ulPropTag; /* The property type */
410 ULONG dwAlignPad; /* Alignment, treat as reserved */
411 union _PV Value; /* The property value */
412 } SPropValue, *LPSPropValue;
414 /* Structure describing a table row (a collection of property values) */
417 ULONG ulAdrEntryPad; /* Padding, treat as reserved */
418 ULONG cValues; /* Count of property values in lpProbs */
419 LPSPropValue lpProps; /* Pointer to an array of property values of length cValues */
422 /* Structure describing a set of table rows */
423 typedef struct _SRowSet
425 ULONG cRows; /* Count of rows in aRow */
426 SRow aRow[MAPI_DIM]; /* Array of rows of length cRows */
427 } SRowSet, *LPSRowSet;
429 #define CbNewSRowSet(c) (offsetof(SRowSet,aRow)+(c)*sizeof(SRow))
430 #define CbSRowSet(p) CbNewSRowSet((p)->cRows)
431 #define SizedSRowSet(n,id) \
432 struct _SRowSet_##id { ULONG cRows; SRow aRow[n]; } id
434 /* Structure describing a problem with a property */
435 typedef struct _SPropProblem
437 ULONG ulIndex; /* Index of the property */
438 ULONG ulPropTag; /* Proprty tag of the property */
439 SCODE scode; /* Error code of the problem */
440 } SPropProblem, *LPSPropProblem;
442 /* A collection of property problems */
443 typedef struct _SPropProblemArray
445 ULONG cProblem; /* Number of problems in aProblem */
446 SPropProblem aProblem[MAPI_DIM]; /* Array of problems of length cProblem */
447 } SPropProblemArray, *LPSPropProblemArray;
449 /* FPropContainsProp flags */
450 #define FL_FULLSTRING 0x00000ul /* Exact string match */
451 #define FL_SUBSTRING 0x00001ul /* Substring match */
452 #define FL_PREFIX 0x00002ul /* Prefix match */
453 #define FL_IGNORECASE 0x10000ul /* Case insensitive */
454 #define FL_IGNORENONSPACE 0x20000ul /* Ignore non spacing characters */
455 #define FL_LOOSE 0x40000ul /* Try very hard to match */
458 /* Table types returned by IMAPITable_GetStatus() */
459 #define TBLTYPE_SNAPSHOT 0U /* Table is fixed at creation time and contents do not change */
460 #define TBLTYPE_KEYSET 1U /* Table has a fixed number of rows, but row values may change */
461 #define TBLTYPE_DYNAMIC 2U /* Table values and the number of rows may change */
463 /* Table status returned by IMAPITable_GetStatus() */
464 #define TBLSTAT_COMPLETE 0U /* All operations have completed (normal status) */
465 #define TBLSTAT_QCHANGED 7U /* Table data has changed as expected */
466 #define TBLSTAT_SORTING 9U /* Table is being asynchronously sorted */
467 #define TBLSTAT_SORT_ERROR 10U /* An error occurred while sorting the table */
468 #define TBLSTAT_SETTING_COLS 11U /* Table columns are being asynchronously changed */
469 #define TBLSTAT_SETCOL_ERROR 13U /* An error occurred during column changing */
470 #define TBLSTAT_RESTRICTING 14U /* Table rows are being asynchronously restricted */
471 #define TBLSTAT_RESTRICT_ERROR 15U /* An error occurred during row restriction */
473 /* Flags for IMAPITable operations that can be asynchronous */
474 #define TBL_NOWAIT 1U /* Perform the operation asynchronously */
475 #define TBL_BATCH 2U /* Perform the operation when the results are needed */
476 #define TBL_ASYNC TBL_NOWAIT /* Synonym for TBL_NOWAIT */
478 /* Flags for IMAPITable_FindRow() */
479 #define DIR_BACKWARD 1U /* Read rows backwards from the start bookmark */
481 /* Table bookmarks */
482 typedef ULONG BOOKMARK;
484 #define BOOKMARK_BEGINNING ((BOOKMARK)0) /* The first row */
485 #define BOOKMARK_CURRENT ((BOOKMARK)1) /* The curent table row */
486 #define BOOKMARK_END ((BOOKMARK)2) /* The last row */
488 /* Row restrictions */
489 typedef struct _SRestriction* LPSRestriction;
491 typedef struct _SAndRestriction
494 LPSRestriction lpRes;
497 typedef struct _SBitMaskRestriction
502 } SBitMaskRestriction;
504 typedef struct _SCommentRestriction
507 LPSRestriction lpRes;
509 } SCommentRestriction;
519 typedef struct _SComparePropsRestriction
524 } SComparePropsRestriction;
526 typedef struct _SContentRestriction
531 } SContentRestriction;
533 typedef struct _SExistRestriction
540 typedef struct _SNotRestriction
543 LPSRestriction lpRes;
546 typedef struct _SOrRestriction
549 LPSRestriction lpRes;
552 typedef struct _SPropertyRestriction
557 } SPropertyRestriction;
559 typedef struct _SSizeRestriction
566 typedef struct _SSubRestriction
569 LPSRestriction lpRes;
572 /* Restriction types */
576 #define RES_CONTENT 3U
577 #define RES_PROPERTY 4U
578 #define RES_COMPAREPROPS 5U
579 #define RES_BITMASK 6U
582 #define RES_SUBRESTRICTION 9U
583 #define RES_COMMENT 10U
585 typedef struct _SRestriction
590 SAndRestriction resAnd;
591 SBitMaskRestriction resBitMask;
592 SCommentRestriction resComment;
593 SComparePropsRestriction resCompareProps;
594 SContentRestriction resContent;
595 SExistRestriction resExist;
596 SNotRestriction resNot;
597 SOrRestriction resOr;
598 SPropertyRestriction resProperty;
599 SSizeRestriction resSize;
600 SSubRestriction resSub;
605 typedef struct _MAPIERROR
607 ULONG ulVersion; /* Mapi version */
608 #if defined (UNICODE) || defined (__WINESRC__)
609 LPWSTR lpszError; /* Error and component strings. These are Ascii */
610 LPWSTR lpszComponent; /* unless the MAPI_UNICODE flag is passed in */
615 ULONG ulLowLevelError;
617 } MAPIERROR, *LPMAPIERROR;
620 #define TABLE_SORT_ASCEND 0U
621 #define TABLE_SORT_DESCEND 1U
622 #define TABLE_SORT_COMBINE 2U
624 typedef struct _SSortOrder
628 } SSortOrder, *LPSSortOrder;
630 typedef struct _SSortOrderSet
635 SSortOrder aSort[MAPI_DIM];
636 } SSortOrderSet, * LPSSortOrderSet;
639 #define MNID_STRING 1
641 typedef struct _MAPINAMEID
650 } MAPINAMEID, *LPMAPINAMEID;
652 /* Desired notification types (bitflags) */
653 #define fnevCriticalError 0x00000001UL
654 #define fnevNewMail 0x00000002UL
655 #define fnevObjectCreated 0x00000004UL
656 #define fnevObjectDeleted 0x00000008UL
657 #define fnevObjectModified 0x00000010UL
658 #define fnevObjectMoved 0x00000020UL
659 #define fnevObjectCopied 0x00000040UL
660 #define fnevSearchComplete 0x00000080UL
661 #define fnevTableModified 0x00000100UL
662 #define fnevStatusObjectModified 0x00000200UL
663 #define fnevReservedForMapi 0x40000000UL
664 #define fnevExtended 0x80000000UL
666 /* Type of notification event */
667 #define TABLE_CHANGED 1U
668 #define TABLE_ERROR 2U
669 #define TABLE_ROW_ADDED 3U
670 #define TABLE_ROW_DELETED 4U
671 #define TABLE_ROW_MODIFIED 5U
672 #define TABLE_SORT_DONE 6U
673 #define TABLE_RESTRICT_DONE 7U
674 #define TABLE_SETCOL_DONE 8U
675 #define TABLE_RELOAD 9U
677 /* fnevCriticalError notification */
678 typedef struct _ERROR_NOTIFICATION
684 LPMAPIERROR lpMAPIError;
685 } ERROR_NOTIFICATION;
687 /* fnevNewMail notification */
688 typedef struct _NEWMAIL_NOTIFICATION
693 LPENTRYID lpParentID;
695 #if defined (UNICODE) || defined (__WINESRC__)
696 LPWSTR lpszMessageClass;
698 LPSTR lpszMessageClass;
700 ULONG ulMessageFlags;
701 } NEWMAIL_NOTIFICATION;
703 /* fnevObjectCreated/Deleted/Modified/Moved/Copied notification */
704 typedef struct _OBJECT_NOTIFICATION
710 LPENTRYID lpParentID;
714 LPENTRYID lpOldParentID;
715 LPSPropTagArray lpPropTagArray;
716 } OBJECT_NOTIFICATION;
718 /* fnevTableModified notification */
719 typedef struct _TABLE_NOTIFICATION
723 SPropValue propIndex;
724 SPropValue propPrior;
727 } TABLE_NOTIFICATION;
729 /* fnevExtended notification */
730 typedef struct _EXTENDED_NOTIFICATION
734 LPBYTE pbEventParameters;
735 } EXTENDED_NOTIFICATION;
737 /* fnevStatusObjectModified notification */
743 LPSPropValue lpPropVals;
744 } STATUS_OBJECT_NOTIFICATION;
746 /* The notification structure passed to advise sinks */
747 typedef struct _NOTIFICATION
753 ERROR_NOTIFICATION err;
754 NEWMAIL_NOTIFICATION newmail;
755 OBJECT_NOTIFICATION obj;
756 TABLE_NOTIFICATION tab;
757 EXTENDED_NOTIFICATION ext;
758 STATUS_OBJECT_NOTIFICATION statobj;
760 } NOTIFICATION, *LPNOTIFICATION;
762 typedef LONG (WINAPI NOTIFCALLBACK)(LPVOID,ULONG,LPNOTIFICATION);
763 typedef NOTIFCALLBACK *LPNOTIFCALLBACK;
765 /*****************************************************************************
766 * IMAPITable interface
768 * This is the read-only 'view' over an I(MAPI)TableData object.
770 #define INTERFACE IMAPITable
771 DECLARE_INTERFACE_(IMAPITable,IUnknown)
773 /*** IUnknown methods ***/
774 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
775 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
776 STDMETHOD_(ULONG,Release)(THIS) PURE;
777 /*** IMAPITable methods ***/
778 STDMETHOD(GetLastError)(THIS_ HRESULT hRes, ULONG ulFlags, LPMAPIERROR *lppError) PURE;
779 STDMETHOD(Advise)(THIS_ ULONG ulMask, LPMAPIADVISESINK lpSink, ULONG *lpCxn) PURE;
780 STDMETHOD(Unadvise)(THIS_ ULONG ulCxn) PURE;
781 STDMETHOD(GetStatus)(THIS_ ULONG *lpStatus, ULONG *lpType) PURE;
782 STDMETHOD(SetColumns)(THIS_ LPSPropTagArray lpProps, ULONG ulFlags) PURE;
783 STDMETHOD(QueryColumns)(THIS_ ULONG ulFlags, LPSPropTagArray *lpCols) PURE;
784 STDMETHOD(GetRowCount)(THIS_ ULONG ulFlags, ULONG *lpCount) PURE;
785 STDMETHOD(SeekRow)(THIS_ BOOKMARK lpStart, LONG lRows, LONG *lpSeeked) PURE;
786 STDMETHOD(SeekRowApprox)(THIS_ ULONG ulNum, ULONG ulDenom) PURE;
787 STDMETHOD(QueryPosition)(THIS_ ULONG *lpRow, ULONG *lpNum, ULONG *lpDenom) PURE;
788 STDMETHOD(FindRow)(THIS_ LPSRestriction lpRestrict, BOOKMARK lpOrigin, ULONG ulFlags) PURE;
789 STDMETHOD(Restrict)(THIS_ LPSRestriction lpRestrict, ULONG ulFlags) PURE;
790 STDMETHOD(CreateBookmark)(THIS_ BOOKMARK *lppPos) PURE;
791 STDMETHOD(FreeBookmark)(THIS_ BOOKMARK lpPos) PURE;
792 STDMETHOD(SortTable)(THIS_ LPSSortOrderSet lpSortOpts, ULONG ulFlags) PURE;
793 STDMETHOD(QuerySortOrder)(THIS_ LPSSortOrderSet *lppSortOpts) PURE;
794 STDMETHOD(QueryRows)(THIS_ LONG lRows, ULONG ulFlags, LPSRowSet *lppRows) PURE;
795 STDMETHOD(Abort) (THIS) PURE;
796 STDMETHOD(ExpandRow)(THIS_ ULONG cbKey, LPBYTE lpKey, ULONG ulRows,
797 ULONG ulFlags, LPSRowSet *lppRows, ULONG *lpMore) PURE;
798 STDMETHOD(CollapseRow)(THIS_ ULONG cbKey, LPBYTE lpKey, ULONG ulFlags, ULONG *lpRows) PURE;
799 STDMETHOD(WaitForCompletion)(THIS_ ULONG ulFlags, ULONG ulTime, ULONG *lpState) PURE;
800 STDMETHOD(GetCollapseState)(THIS_ ULONG ulFlags, ULONG cbKey, LPBYTE lpKey,
801 ULONG *lpStateLen, LPBYTE *lpState) PURE;
802 STDMETHOD(SetCollapseState)(THIS_ ULONG ulFlags, ULONG ulLen,
803 LPBYTE lpStart, BOOKMARK *lppWhere) PURE;
807 #if !defined(__cplusplus) || defined(CINTERFACE)
808 /*** IUnknown methods ***/
809 #define IMAPITable_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
810 #define IMAPITable_AddRef(p) (p)->lpVtbl->AddRef(p)
811 #define IMAPITable_Release(p) (p)->lpVtbl->Release(p)
812 /*** IMAPITable methods ***/
813 #define IMAPITable_GetLastError(p,a,b,c) (p)->lpVtbl->GetLastError(p,a,b,c)
814 #define IMAPITable_Advise(p,a,b,c) (p)->lpVtbl->Advise(p,a,b,c)
815 #define IMAPITable_Unadvise(p,a) (p)->lpVtbl->Unadvise(p,a)
816 #define IMAPITable_GetStatus(p,a,b) (p)->lpVtbl->GetStatus(p,a,b)
817 #define IMAPITable_SetColumns(p,a,b) (p)->lpVtbl->SetColumns(p,a,b)
818 #define IMAPITable_QueryColumns(p,a,b) (p)->lpVtbl->QueryColumns(p,a,b)
819 #define IMAPITable_GetRowCount(p,a,b) (p)->lpVtbl->GetRowCount(p,a,b)
820 #define IMAPITable_SeekRow(p,a,b) (p)->lpVtbl->SeekRow(p,a,b)
821 #define IMAPITable_SeekRowApprox(p,a,b) (p)->lpVtbl->SeekRowApprox(p,a,b)
822 #define IMAPITable_QueryPosition(p,a,b) (p)->lpVtbl->QueryPosition(p,a,b)
823 #define IMAPITable_FindRow(p,a,b,c) (p)->lpVtbl->FindRow(p,a,b,c)
824 #define IMAPITable_Restrict(p,a,b) (p)->lpVtbl->Recstrict(p,a,b)
825 #define IMAPITable_CreateBookmark(p,a) (p)->lpVtbl->CreateBookmark(p,a)
826 #define IMAPITable_FreeBookmark(p,a) (p)->lpVtbl->FreeBookmark(p,a)
827 #define IMAPITable_SortTable(p,a,b) (p)->lpVtbl->SortTable(p,a,b)
828 #define IMAPITable_QuerySortOrder(p,a) (p)->lpVtbl->QuerySortOrder(p,a)
829 #define IMAPITable_QueryRows(p,a,b,c) (p)->lpVtbl->QueryRows(p,a,b,c)
830 #define IMAPITable_Abort(p) (p)->lpVtbl->Abort(p)
831 #define IMAPITable_ExpandRow(p,a,b,c,d,e,f) (p)->lpVtbl->ExpandRow(p,a,b,c,d,e,f)
832 #define IMAPITable_CollapseRow(p,a,b,c,d) (p)->lpVtbl->CollapseRow(p,a,b,c,d)
833 #define IMAPITable_WaitForCompletion(p,a,b,c) (p)->lpVtbl->WaitForCompletion(p,a,b,c)
834 #define IMAPITable_GetCollapseState(p,a,b,c,d,e) (p)->lpVtbl->GetCollapseState(p,a,b,c,d,e)
835 #define IMAPITable_SetCollapseState(p,a,b,c,d) (p)->lpVtbl->SetCollapseState(p,a,b,c,d)
838 /*****************************************************************************
839 * IMAPIAdviseSink interface
841 #define INTERFACE IMAPIAdviseSink
842 DECLARE_INTERFACE_(IMAPIAdviseSink,IUnknown)
844 /*** IUnknown methods ***/
845 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
846 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
847 STDMETHOD_(ULONG,Release)(THIS) PURE;
848 /*** IMAPIAdviseSink methods ***/
849 STDMETHOD(OnNotify)(THIS_ ULONG NumNotif, LPNOTIFICATION lpNotif) PURE;
853 #if !defined(__cplusplus) || defined(CINTERFACE)
854 /*** IUnknown methods ***/
855 #define IMAPIAdviseSink_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
856 #define IMAPIAdviseSink_AddRef(p) (p)->lpVtbl->AddRef(p)
857 #define IMAPIAdviseSink_Release(p) (p)->lpVtbl->Release(p)
858 /*** IMAPIAdviseSink methods ***/
859 #define IMAPIAdviseSink_OnNotify(p,a,b) (p)->lpVtbl->OnNotify(p,a,b)
862 /*****************************************************************************
863 * IMAPIProp interface
865 #define INTERFACE IMAPIProp
866 DECLARE_INTERFACE_(IMAPIProp,IUnknown)
868 /*** IUnknown methods ***/
869 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
870 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
871 STDMETHOD_(ULONG,Release)(THIS) PURE;
872 /*** IMAPIProp methods ***/
873 STDMETHOD(GetLastError)(THIS_ HRESULT hRes, ULONG ulFlags, LPMAPIERROR *lppErr) PURE;
874 STDMETHOD(SaveChanges)(THIS_ ULONG ulFlags) PURE;
875 STDMETHOD(GetProps)(THIS_ LPSPropTagArray lpPropTags, ULONG ulFlags, ULONG *lpValues, LPSPropValue *lppProps) PURE;
876 STDMETHOD(GetPropList)(THIS_ ULONG ulFlags, LPSPropTagArray *lppPropTagArray) PURE;
877 STDMETHOD(OpenProperty)(THIS_ ULONG ulPropTag, LPCIID lpIid, ULONG ulOpts, ULONG ulFlags, LPUNKNOWN *lppUnk) PURE;
878 STDMETHOD(SetProps)(THIS_ ULONG cValues, LPSPropValue lpProps, LPSPropProblemArray *lppProbs) PURE;
879 STDMETHOD(DeleteProps)(THIS_ LPSPropTagArray lpPropTags, LPSPropProblemArray *lppProbs) PURE;
880 STDMETHOD(CopyTo)(THIS_ ULONG ciidExclude, LPCIID lpIid, LPSPropTagArray lpProps, ULONG ulParam,
881 LPMAPIPROGRESS lpProgress, LPCIID lpIface,LPVOID lpDest, ULONG ulFlags,
882 LPSPropProblemArray *lppProbs) PURE;
883 STDMETHOD(CopyProps)(THIS_ LPSPropTagArray lpIncludeProps, ULONG ulParam, LPMAPIPROGRESS lpProgress,
884 LPCIID lpIid, LPVOID lpDestObj, ULONG ulFlags, LPSPropProblemArray *lppProblems) PURE;
885 STDMETHOD(GetNamesFromIDs)(THIS_ LPSPropTagArray *lppPropTags, LPGUID lpIid, ULONG ulFlags, ULONG *lpCount,
886 LPMAPINAMEID **lpppNames) PURE;
887 STDMETHOD(GetIDsFromNames)(THIS_ ULONG cPropNames, LPMAPINAMEID *lppNames, ULONG ulFlags, LPSPropTagArray *lppPropTags) PURE;
891 #if !defined(__cplusplus) || defined(CINTERFACE)
892 /*** IUnknown methods ***/
893 #define IMAPIProp_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
894 #define IMAPIProp_AddRef(p) (p)->lpVtbl->AddRef(p)
895 #define IMAPIProp_Release(p) (p)->lpVtbl->Release(p)
896 /*** IMAPIProp methods ***/
897 #define IMAPIProp_GetLastError(p,a,b,c) (p)->lpVtbl->GetLastError(p,a,b,c)
898 #define IMAPIProp_SaveChanges(p,a) (p)->lpVtbl->SaveChanges(p,a)
899 #define IMAPIProp_GetProps(p,a,b,c,d) (p)->lpVtbl->GetProps(p,a,b,c,d)
900 #define IMAPIProp_GetPropList(p,a,b) (p)->lpVtbl->GetPropList(p,a,b)
901 #define IMAPIProp_OpenProperty(p,a,b,c,d,e) (p)->lpVtbl->OpenProperty(p,a,b,c,d,e)
902 #define IMAPIProp_SetProps(p,a,b,c) (p)->lpVtbl->SetProps(p,a,b,c)
903 #define IMAPIProp_DeleteProps(p,a,b) (p)->lpVtbl->DeleteProps(p,a,b)
904 #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)
905 #define IMAPIProp_CopyProps(p,a,b,c,d,e,f,g) (p)->lpVtbl->CopyProps(p,a,b,c,d,e,f,g)
906 #define IMAPIProp_GetNamesFromIDs(p,a,b,c,d,e) (p)->lpVtbl->GetNamesFromIDs(p,a,b,c,d,e)
907 #define IMAPIProp_GetIDsFromNames(p,a,b,c,d) (p)->lpVtbl->GetIDsFromNames(p,a,b,c,d)
913 BYTE abEntry[MAPI_DIM];
914 } FLATENTRY, *LPFLATENTRY;
920 BYTE abEntries[MAPI_DIM];
921 } FLATENTRYLIST, *LPFLATENTRYLIST;
933 BYTE abMTSIDs[MAPI_DIM];
934 } FLATMTSIDLIST, *LPFLATMTSIDLIST;
936 typedef struct _ADRENTRY
940 LPSPropValue rgPropVals;
941 } ADRENTRY, *LPADRENTRY;
943 typedef struct _ADRLIST
946 ADRENTRY aEntries[MAPI_DIM];
947 } ADRLIST, *LPADRLIST;
949 #endif /*MAPIDEFS_H*/