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
61 #ifdef WORDS_BIGENDIAN
68 } FILETIME
, *PFILETIME
, *LPFILETIME
;
71 /* Memory allocation routines */
72 typedef SCODE (WINAPI ALLOCATEBUFFER
)(ULONG
,LPVOID
*);
73 typedef SCODE (WINAPI ALLOCATEMORE
)(ULONG
,LPVOID
,LPVOID
*);
74 typedef ULONG (WINAPI FREEBUFFER
)(LPVOID
);
76 typedef ALLOCATEBUFFER
*LPALLOCATEBUFFER
;
77 typedef ALLOCATEMORE
*LPALLOCATEMORE
;
78 typedef FREEBUFFER
*LPFREEBUFFER
;
80 /* MAPI exposed interfaces */
81 typedef const IID
*LPCIID
;
83 typedef struct IAddrBook IAddrBook
;
84 typedef IAddrBook
*LPADRBOOK
;
85 typedef struct IABContainer IABContainer
;
86 typedef IABContainer
*LPABCONT
;
87 typedef struct IAttach IAttach
;
88 typedef IAttach
*LPATTACH
;
89 typedef struct IDistList IDistList
;
90 typedef IDistList
*LPDISTLIST
;
91 typedef struct IMailUser IMailUser
;
92 typedef IMailUser
*LPMAILUSER
;
93 typedef struct IMAPIAdviseSink IMAPIAdviseSink
;
94 typedef IMAPIAdviseSink
*LPMAPIADVISESINK
;
95 typedef struct IMAPIContainer IMAPIContainer
;
96 typedef IMAPIContainer
*LPMAPICONTAINER
;
97 typedef struct IMAPIFolder IMAPIFolder
;
98 typedef IMAPIFolder
*LPMAPIFOLDER
;
99 typedef struct IMAPIProgress IMAPIProgress
;
100 typedef IMAPIProgress
*LPMAPIPROGRESS
;
101 typedef struct IMAPIProp IMAPIProp
;
102 typedef IMAPIProp
*LPMAPIPROP
;
103 typedef struct IMAPIStatus IMAPIStatus
;
104 typedef IMAPIStatus
*LPMAPISTATUS
;
105 typedef struct IMAPITable IMAPITable
;
106 typedef IMAPITable
*LPMAPITABLE
;
107 typedef struct IMessage IMessage
;
108 typedef IMessage
*LPMESSAGE
;
109 typedef struct IMsgStore IMsgStore
;
110 typedef IMsgStore
*LPMDB
;
111 typedef struct IProfSect IProfSect
;
112 typedef IProfSect
*LPPROFSECT
;
113 typedef struct IProviderAdmin IProviderAdmin
;
114 typedef IProviderAdmin
*LPPROVIDERADMIN
;
117 # define MAPI_DIM 1 /* Default to one dimension for variable length arrays */
120 /* Flags for abFlags[0] */
121 #define MAPI_NOTRESERVED 0x08
122 #define MAPI_NOW 0x10
123 #define MAPI_THISSESSION 0x20
124 #define MAPI_NOTRECIP 0x40
125 #define MAPI_SHORTTERM 0x80
127 /* Flags for abFlags[1] */
128 #define MAPI_COMPOUND 0x80
130 typedef struct _ENTRYID
134 } ENTRYID
, *LPENTRYID
;
137 typedef struct _MAPIUID
139 BYTE ab
[sizeof(GUID
)];
140 } MAPIUID
, *LPMAPIUID
;
142 #define IsEqualMAPIUID(pl,pr) (!memcmp((pl),(pr),sizeof(MAPIUID)))
144 #define MAPI_ONE_OFF_UID { 0x81,0x2b,0x1f,0xa4,0xbe,0xa3,0x10,0x19,0x9d,0x6e, \
145 0x00,0xdd,0x01,0x0f,0x54,0x02 }
146 #define MAPI_ONE_OFF_UNICODE 0x8000
147 #define MAPI_ONE_OFF_NO_RICH_INFO 0x0001
150 #define MAPI_STORE 1U
151 #define MAPI_ADDRBOOK 2U
152 #define MAPI_FOLDER 3U
153 #define MAPI_ABCONT 4U
154 #define MAPI_MESSAGE 5U
155 #define MAPI_MAILUSER 6U
156 #define MAPI_ATTACH 7U
157 #define MAPI_DISTLIST 8U
158 #define MAPI_PROFSECT 9U
159 #define MAPI_STATUS 10U
160 #define MAPI_SESSION 11U
161 #define MAPI_FORMINFO 12U
163 /* Flags for various calls */
164 #define MAPI_MODIFY 0x00000001U /* Object can be modified */
165 #define MAPI_ACCESS_MODIFY MAPI_MODIFY /* Want write access */
166 #define MAPI_ACCESS_READ 0x00000002U /* Want read access */
167 #define MAPI_ACCESS_DELETE 0x00000004U /* Want delete access */
168 #define MAPI_ACCESS_CREATE_HIERARCHY 0x00000008U
169 #define MAPI_ACCESS_CREATE_CONTENTS 0x00000010U
170 #define MAPI_ACCESS_CREATE_ASSOCIATED 0x00000020U
171 #define MAPI_UNICODE 0x80000000U /* Strings in this call are Unicode */
173 #if defined (UNICODE) || defined (__WINESRC__)
174 #define fMapiUnicode MAPI_UNICODE
176 #define fMapiUnicode 0U
179 /* Types of message receivers */
181 #define MAPI_ORIG 0 /* The original author */
182 #define MAPI_TO 1 /* The primary message receiver */
183 #define MAPI_CC 2 /* A carbon copy receiver */
184 #define MAPI_BCC 3 /* A blind carbon copy receiver */
185 #define MAPI_P1 0x10000000 /* A message resend */
186 #define MAPI_SUBMITTED 0x80000000 /* This message has already been sent */
189 #ifndef cchProfileNameMax
190 #define cchProfileNameMax 64 /* Maximum length of a profile name */
191 #define cchProfilePassMax 64 /* Maximum length of a profile password */
194 /* Properties: The are the contents of cells in MAPI tables, as well as the
195 * values returned when object properties are queried.
199 #define PT_UNSPECIFIED 0U
202 #define PT_SHORT PT_I2
204 #define PT_I4 PT_LONG
206 #define PT_FLOAT PT_R4
208 #define PT_R8 PT_DOUBLE
209 #define PT_CURRENCY 6U
210 #define PT_APPTIME 7U
212 #define PT_BOOLEAN 11U
213 #define PT_OBJECT 13U
215 #define PT_LONGLONG PT_I8
216 #define PT_STRING8 30U
217 #define PT_UNICODE 31U
218 #define PT_SYSTIME 64U
220 #define PT_BINARY 258U
222 #define MV_FLAG 0x1000 /* This property type is multi-valued (an array) */
223 #define MV_INSTANCE 0x2000
224 #define MVI_FLAG (MV_FLAG|MV_INSTANCE)
225 #define MVI_PROP(t) ((t)|MVI_FLAG)
229 # define PT_TSTRING PT_UNICODE
230 # define PT_MV_TSTRING (MV_FLAG|PT_UNICODE)
232 # define LPPSZ lppszW
235 # define PT_TSTRING PT_STRING8
236 # define PT_MV_TSTRING (MV_FLAG|PT_STRING8)
238 # define LPPSZ lppszA
243 #define PROP_TYPE_MASK 0xFFFFU
244 #define PROP_TYPE(t) ((t) & PROP_TYPE_MASK)
245 #define PROP_ID(t) ((t) >> 16)
246 #define PROP_TAG(t,id) (((id) << 16) | t)
247 #define PROP_ID_NULL 0
248 #define PROP_ID_INVALID 0xFFFF
249 #define PR_NULL PROP_TAG(PT_NULL, PROP_ID_NULL)
251 #define CHANGE_PROP_TYPE(t,typ) ((0xFFFF0000 & t) | typ)
253 /* Multi-valued property types */
254 #define PT_MV_I2 (MV_FLAG|PT_I2)
255 #define PT_MV_SHORT PT_MV_I2
256 #define PT_MV_LONG (MV_FLAG|PT_LONG)
257 #define PT_MV_I4 PT_MV_LONG
258 #define PT_MV_R4 (MV_FLAG|PT_R4)
259 #define PT_MV_FLOAT PT_MV_R4
260 #define PT_MV_DOUBLE (MV_FLAG|PT_DOUBLE)
261 #define PT_MV_R8 PT_MV_DOUBLE
262 #define PT_MV_CURRENCY (MV_FLAG|PT_CURRENCY)
263 #define PT_MV_APPTIME (MV_FLAG|PT_APPTIME)
264 #define PT_MV_SYSTIME (MV_FLAG|PT_SYSTIME)
265 #define PT_MV_STRING8 (MV_FLAG|PT_STRING8)
266 #define PT_MV_BINARY (MV_FLAG|PT_BINARY)
267 #define PT_MV_UNICODE (MV_FLAG|PT_UNICODE)
268 #define PT_MV_CLSID (MV_FLAG|PT_CLSID)
269 #define PT_MV_I8 (MV_FLAG|PT_I8)
270 #define PT_MV_LONGLONG PT_MV_I8
273 /* The property tag structure. This describes a list of columns */
274 typedef struct _SPropTagArray
276 ULONG cValues
; /* Number of elements in aulPropTag */
277 ULONG aulPropTag
[MAPI_DIM
]; /* Property tags */
278 } SPropTagArray
, *LPSPropTagArray
;
280 #define CbNewSPropTagArray(c) (offsetof(SPropTagArray,aulPropTag)+(c)*sizeof(ULONG))
281 #define CbSPropTagArray(p) CbNewSPropTagArray((p)->cValues)
282 #define SizedSPropTagArray(n,id) \
283 struct _SPropTagArray_##id { ULONG cValues; ULONG aulPropTag[n]; } id
285 /* Multi-valued PT_APPTIME property value */
286 typedef struct _SAppTimeArray
288 ULONG cValues
; /* Number of doubles in lpat */
289 double *lpat
; /* Pointer to double array of length cValues */
292 /* PT_BINARY property value */
293 typedef struct _SBinary
295 ULONG cb
; /* Number of bytes in lpb */
296 LPBYTE lpb
; /* Pointer to byte array of length cb */
297 } SBinary
, *LPSBinary
;
299 /* Multi-valued PT_BINARY property value */
300 typedef struct _SBinaryArray
302 ULONG cValues
; /* Number of SBinarys in lpbin */
303 SBinary
*lpbin
; /* Pointer to SBinary array of length cValues */
306 typedef SBinaryArray ENTRYLIST
, *LPENTRYLIST
;
308 /* Multi-valued PT_CY property value */
309 typedef struct _SCurrencyArray
311 ULONG cValues
; /* Number of CYs in lpcu */
312 CY
*lpcur
; /* Pointer to CY array of length cValues */
315 /* Multi-valued PT_SYSTIME property value */
316 typedef struct _SDateTimeArray
318 ULONG cValues
; /* Number of FILETIMEs in lpft */
319 FILETIME
*lpft
; /* Pointer to FILETIME array of length cValues */
322 /* Multi-valued PT_DOUBLE property value */
323 typedef struct _SDoubleArray
325 ULONG cValues
; /* Number of doubles in lpdbl */
326 double *lpdbl
; /* Pointer to double array of length cValues */
329 /* Multi-valued PT_CLSID property value */
330 typedef struct _SGuidArray
332 ULONG cValues
; /* Number of GUIDs in lpguid */
333 GUID
*lpguid
; /* Pointer to GUID array of length cValues */
336 /* Multi-valued PT_LONGLONG property value */
337 typedef struct _SLargeIntegerArray
339 ULONG cValues
; /* Number of long64s in lpli */
340 LARGE_INTEGER
*lpli
; /* Pointer to long64 array of length cValues */
341 } SLargeIntegerArray
;
343 /* Multi-valued PT_LONG property value */
344 typedef struct _SLongArray
346 ULONG cValues
; /* Number of longs in lpl */
347 LONG
*lpl
; /* Pointer to long array of length cValues */
350 /* Multi-valued PT_STRING8 property value */
351 typedef struct _SLPSTRArray
353 ULONG cValues
; /* Number of Ascii strings in lppszA */
354 LPSTR
*lppszA
; /* Pointer to Ascii string array of length cValues */
357 /* Multi-valued PT_FLOAT property value */
358 typedef struct _SRealArray
360 ULONG cValues
; /* Number of floats in lpflt */
361 float *lpflt
; /* Pointer to float array of length cValues */
364 /* Multi-valued PT_SHORT property value */
365 typedef struct _SShortArray
367 ULONG cValues
; /* Number of shorts in lpb */
368 short int *lpi
; /* Pointer to short array of length cValues */
371 /* Multi-valued PT_UNICODE property value */
372 typedef struct _SWStringArray
374 ULONG cValues
; /* Number of Unicode strings in lppszW */
375 LPWSTR
*lppszW
; /* Pointer to Unicode string array of length cValues */
378 /* A property value */
399 SCurrencyArray MVcur
;
406 SLargeIntegerArray MVli
;
411 /* Property value structure. This is essentially a mini-Variant */
412 typedef struct _SPropValue
414 ULONG ulPropTag
; /* The property type */
415 ULONG dwAlignPad
; /* Alignment, treat as reserved */
416 union _PV Value
; /* The property value */
417 } SPropValue
, *LPSPropValue
;
419 /* Structure describing a table row (a collection of property values) */
422 ULONG ulAdrEntryPad
; /* Padding, treat as reserved */
423 ULONG cValues
; /* Count of property values in lpProbs */
424 LPSPropValue lpProps
; /* Pointer to an array of property values of length cValues */
427 /* Structure describing a set of table rows */
428 typedef struct _SRowSet
430 ULONG cRows
; /* Count of rows in aRow */
431 SRow aRow
[MAPI_DIM
]; /* Array of rows of length cRows */
432 } SRowSet
, *LPSRowSet
;
434 #define CbNewSRowSet(c) (offsetof(SRowSet,aRow)+(c)*sizeof(SRow))
435 #define CbSRowSet(p) CbNewSRowSet((p)->cRows)
436 #define SizedSRowSet(n,id) \
437 struct _SRowSet_##id { ULONG cRows; SRow aRow[n]; } id
439 /* Structure describing a problem with a property */
440 typedef struct _SPropProblem
442 ULONG ulIndex
; /* Index of the property */
443 ULONG ulPropTag
; /* Proprty tag of the property */
444 SCODE scode
; /* Error code of the problem */
445 } SPropProblem
, *LPSPropProblem
;
447 /* A collection of property problems */
448 typedef struct _SPropProblemArray
450 ULONG cProblem
; /* Number of problems in aProblem */
451 SPropProblem aProblem
[MAPI_DIM
]; /* Array of problems of length cProblem */
452 } SPropProblemArray
, *LPSPropProblemArray
;
454 /* FPropContainsProp flags */
455 #define FL_FULLSTRING 0x00000ul /* Exact string match */
456 #define FL_SUBSTRING 0x00001ul /* Substring match */
457 #define FL_PREFIX 0x00002ul /* Prefix match */
458 #define FL_IGNORECASE 0x10000ul /* Case insensitive */
459 #define FL_IGNORENONSPACE 0x20000ul /* Ignore non spacing characters */
460 #define FL_LOOSE 0x40000ul /* Try very hard to match */
463 /* Table types returned by IMAPITable_GetStatus() */
464 #define TBLTYPE_SNAPSHOT 0U /* Table is fixed at creation time and contents do not change */
465 #define TBLTYPE_KEYSET 1U /* Table has a fixed number of rows, but row values may change */
466 #define TBLTYPE_DYNAMIC 2U /* Table values and the number of rows may change */
468 /* Table status returned by IMAPITable_GetStatus() */
469 #define TBLSTAT_COMPLETE 0U /* All operations have completed (normal status) */
470 #define TBLSTAT_QCHANGED 7U /* Table data has changed as expected */
471 #define TBLSTAT_SORTING 9U /* Table is being asynchronously sorted */
472 #define TBLSTAT_SORT_ERROR 10U /* An error occurred while sorting the table */
473 #define TBLSTAT_SETTING_COLS 11U /* Table columns are being asynchronously changed */
474 #define TBLSTAT_SETCOL_ERROR 13U /* An error occurred during column changing */
475 #define TBLSTAT_RESTRICTING 14U /* Table rows are being asynchronously restricted */
476 #define TBLSTAT_RESTRICT_ERROR 15U /* An error occurred during row restriction */
478 /* Flags for IMAPITable operations that can be asynchronous */
479 #define TBL_NOWAIT 1U /* Perform the operation asynchronously */
480 #define TBL_BATCH 2U /* Perform the operation when the results are needed */
481 #define TBL_ASYNC TBL_NOWAIT /* Synonym for TBL_NOWAIT */
483 /* Flags for IMAPITable_FindRow() */
484 #define DIR_BACKWARD 1U /* Read rows backwards from the start bookmark */
486 /* Table bookmarks */
487 typedef ULONG BOOKMARK
;
489 #define BOOKMARK_BEGINNING ((BOOKMARK)0) /* The first row */
490 #define BOOKMARK_CURRENT ((BOOKMARK)1) /* The curent table row */
491 #define BOOKMARK_END ((BOOKMARK)2) /* The last row */
493 /* Row restrictions */
494 typedef struct _SRestriction
* LPSRestriction
;
496 typedef struct _SAndRestriction
499 LPSRestriction lpRes
;
502 typedef struct _SBitMaskRestriction
507 } SBitMaskRestriction
;
509 typedef struct _SCommentRestriction
512 LPSRestriction lpRes
;
514 } SCommentRestriction
;
524 typedef struct _SComparePropsRestriction
529 } SComparePropsRestriction
;
531 typedef struct _SContentRestriction
536 } SContentRestriction
;
538 typedef struct _SExistRestriction
545 typedef struct _SNotRestriction
548 LPSRestriction lpRes
;
551 typedef struct _SOrRestriction
554 LPSRestriction lpRes
;
557 typedef struct _SPropertyRestriction
562 } SPropertyRestriction
;
564 typedef struct _SSizeRestriction
571 typedef struct _SSubRestriction
574 LPSRestriction lpRes
;
577 /* Restriction types */
581 #define RES_CONTENT 3U
582 #define RES_PROPERTY 4U
583 #define RES_COMPAREPROPS 5U
584 #define RES_BITMASK 6U
587 #define RES_SUBRESTRICTION 9U
588 #define RES_COMMENT 10U
590 typedef struct _SRestriction
595 SAndRestriction resAnd
;
596 SBitMaskRestriction resBitMask
;
597 SCommentRestriction resComment
;
598 SComparePropsRestriction resCompareProps
;
599 SContentRestriction resContent
;
600 SExistRestriction resExist
;
601 SNotRestriction resNot
;
602 SOrRestriction resOr
;
603 SPropertyRestriction resProperty
;
604 SSizeRestriction resSize
;
605 SSubRestriction resSub
;
610 typedef struct _MAPIERROR
612 ULONG ulVersion
; /* Mapi version */
613 #if defined (UNICODE) || defined (__WINESRC__)
614 LPWSTR lpszError
; /* Error and component strings. These are Ascii */
615 LPWSTR lpszComponent
; /* unless the MAPI_UNICODE flag is passed in */
620 ULONG ulLowLevelError
;
622 } MAPIERROR
, *LPMAPIERROR
;
625 #define TABLE_SORT_ASCEND 0U
626 #define TABLE_SORT_DESCEND 1U
627 #define TABLE_SORT_COMBINE 2U
629 typedef struct _SSortOrder
633 } SSortOrder
, *LPSSortOrder
;
635 typedef struct _SSortOrderSet
640 SSortOrder aSort
[MAPI_DIM
];
641 } SSortOrderSet
, * LPSSortOrderSet
;
644 #define MNID_STRING 1
646 typedef struct _MAPINAMEID
655 } MAPINAMEID
, *LPMAPINAMEID
;
657 /* Desired notification types (bitflags) */
658 #define fnevCriticalError 0x00000001UL
659 #define fnevNewMail 0x00000002UL
660 #define fnevObjectCreated 0x00000004UL
661 #define fnevObjectDeleted 0x00000008UL
662 #define fnevObjectModified 0x00000010UL
663 #define fnevObjectMoved 0x00000020UL
664 #define fnevObjectCopied 0x00000040UL
665 #define fnevSearchComplete 0x00000080UL
666 #define fnevTableModified 0x00000100UL
667 #define fnevStatusObjectModified 0x00000200UL
668 #define fnevReservedForMapi 0x40000000UL
669 #define fnevExtended 0x80000000UL
671 /* Type of notification event */
672 #define TABLE_CHANGED 1U
673 #define TABLE_ERROR 2U
674 #define TABLE_ROW_ADDED 3U
675 #define TABLE_ROW_DELETED 4U
676 #define TABLE_ROW_MODIFIED 5U
677 #define TABLE_SORT_DONE 6U
678 #define TABLE_RESTRICT_DONE 7U
679 #define TABLE_SETCOL_DONE 8U
680 #define TABLE_RELOAD 9U
682 /* fnevCriticalError notification */
683 typedef struct _ERROR_NOTIFICATION
689 LPMAPIERROR lpMAPIError
;
690 } ERROR_NOTIFICATION
;
692 /* fnevNewMail notification */
693 typedef struct _NEWMAIL_NOTIFICATION
698 LPENTRYID lpParentID
;
700 #if defined (UNICODE) || defined (__WINESRC__)
701 LPWSTR lpszMessageClass
;
703 LPSTR lpszMessageClass
;
705 ULONG ulMessageFlags
;
706 } NEWMAIL_NOTIFICATION
;
708 /* fnevObjectCreated/Deleted/Modified/Moved/Copied notification */
709 typedef struct _OBJECT_NOTIFICATION
715 LPENTRYID lpParentID
;
719 LPENTRYID lpOldParentID
;
720 LPSPropTagArray lpPropTagArray
;
721 } OBJECT_NOTIFICATION
;
723 /* fnevTableModified notification */
724 typedef struct _TABLE_NOTIFICATION
728 SPropValue propIndex
;
729 SPropValue propPrior
;
732 } TABLE_NOTIFICATION
;
734 /* fnevExtended notification */
735 typedef struct _EXTENDED_NOTIFICATION
739 LPBYTE pbEventParameters
;
740 } EXTENDED_NOTIFICATION
;
742 /* fnevStatusObjectModified notification */
748 LPSPropValue lpPropVals
;
749 } STATUS_OBJECT_NOTIFICATION
;
751 /* The notification structure passed to advise sinks */
752 typedef struct _NOTIFICATION
758 ERROR_NOTIFICATION err
;
759 NEWMAIL_NOTIFICATION newmail
;
760 OBJECT_NOTIFICATION obj
;
761 TABLE_NOTIFICATION tab
;
762 EXTENDED_NOTIFICATION ext
;
763 STATUS_OBJECT_NOTIFICATION statobj
;
765 } NOTIFICATION
, *LPNOTIFICATION
;
767 typedef LONG (WINAPI NOTIFCALLBACK
)(LPVOID
,ULONG
,LPNOTIFICATION
);
768 typedef NOTIFCALLBACK
*LPNOTIFCALLBACK
;
770 /*****************************************************************************
771 * IMAPITable interface
773 * This is the read-only 'view' over an I(MAPI)TableData object.
775 #define INTERFACE IMAPITable
776 DECLARE_INTERFACE_(IMAPITable
,IUnknown
)
778 /*** IUnknown methods ***/
779 STDMETHOD_(HRESULT
,QueryInterface
)(THIS_ REFIID riid
, void** ppvObject
) PURE
;
780 STDMETHOD_(ULONG
,AddRef
)(THIS
) PURE
;
781 STDMETHOD_(ULONG
,Release
)(THIS
) PURE
;
782 /*** IMAPITable methods ***/
783 STDMETHOD(GetLastError
)(THIS_ HRESULT hRes
, ULONG ulFlags
, LPMAPIERROR
*lppError
) PURE
;
784 STDMETHOD(Advise
)(THIS_ ULONG ulMask
, LPMAPIADVISESINK lpSink
, ULONG
*lpCxn
) PURE
;
785 STDMETHOD(Unadvise
)(THIS_ ULONG ulCxn
) PURE
;
786 STDMETHOD(GetStatus
)(THIS_ ULONG
*lpStatus
, ULONG
*lpType
) PURE
;
787 STDMETHOD(SetColumns
)(THIS_ LPSPropTagArray lpProps
, ULONG ulFlags
) PURE
;
788 STDMETHOD(QueryColumns
)(THIS_ ULONG ulFlags
, LPSPropTagArray
*lpCols
) PURE
;
789 STDMETHOD(GetRowCount
)(THIS_ ULONG ulFlags
, ULONG
*lpCount
) PURE
;
790 STDMETHOD(SeekRow
)(THIS_ BOOKMARK lpStart
, LONG lRows
, LONG
*lpSeeked
) PURE
;
791 STDMETHOD(SeekRowApprox
)(THIS_ ULONG ulNum
, ULONG ulDenom
) PURE
;
792 STDMETHOD(QueryPosition
)(THIS_ ULONG
*lpRow
, ULONG
*lpNum
, ULONG
*lpDenom
) PURE
;
793 STDMETHOD(FindRow
)(THIS_ LPSRestriction lpRestrict
, BOOKMARK lpOrigin
, ULONG ulFlags
) PURE
;
794 STDMETHOD(Restrict
)(THIS_ LPSRestriction lpRestrict
, ULONG ulFlags
) PURE
;
795 STDMETHOD(CreateBookmark
)(THIS_ BOOKMARK
*lppPos
) PURE
;
796 STDMETHOD(FreeBookmark
)(THIS_ BOOKMARK lpPos
) PURE
;
797 STDMETHOD(SortTable
)(THIS_ LPSSortOrderSet lpSortOpts
, ULONG ulFlags
) PURE
;
798 STDMETHOD(QuerySortOrder
)(THIS_ LPSSortOrderSet
*lppSortOpts
) PURE
;
799 STDMETHOD(QueryRows
)(THIS_ LONG lRows
, ULONG ulFlags
, LPSRowSet
*lppRows
) PURE
;
800 STDMETHOD(Abort
) (THIS
) PURE
;
801 STDMETHOD(ExpandRow
)(THIS_ ULONG cbKey
, LPBYTE lpKey
, ULONG ulRows
,
802 ULONG ulFlags
, LPSRowSet
*lppRows
, ULONG
*lpMore
) PURE
;
803 STDMETHOD(CollapseRow
)(THIS_ ULONG cbKey
, LPBYTE lpKey
, ULONG ulFlags
, ULONG
*lpRows
) PURE
;
804 STDMETHOD(WaitForCompletion
)(THIS_ ULONG ulFlags
, ULONG ulTime
, ULONG
*lpState
) PURE
;
805 STDMETHOD(GetCollapseState
)(THIS_ ULONG ulFlags
, ULONG cbKey
, LPBYTE lpKey
,
806 ULONG
*lpStateLen
, LPBYTE
*lpState
) PURE
;
807 STDMETHOD(SetCollapseState
)(THIS_ ULONG ulFlags
, ULONG ulLen
,
808 LPBYTE lpStart
, BOOKMARK
*lppWhere
) PURE
;
812 #if !defined(__cplusplus) || defined(CINTERFACE)
813 /*** IUnknown methods ***/
814 #define IMAPITable_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
815 #define IMAPITable_AddRef(p) (p)->lpVtbl->AddRef(p)
816 #define IMAPITable_Release(p) (p)->lpVtbl->Release(p)
817 /*** IMAPITable methods ***/
818 #define IMAPITable_GetLastError(p,a,b,c) (p)->lpVtbl->GetLastError(p,a,b,c)
819 #define IMAPITable_Advise(p,a,b,c) (p)->lpVtbl->Advise(p,a,b,c)
820 #define IMAPITable_Unadvise(p,a) (p)->lpVtbl->Unadvise(p,a)
821 #define IMAPITable_GetStatus(p,a,b) (p)->lpVtbl->GetStatus(p,a,b)
822 #define IMAPITable_SetColumns(p,a,b) (p)->lpVtbl->SetColumns(p,a,b)
823 #define IMAPITable_QueryColumns(p,a,b) (p)->lpVtbl->QueryColumns(p,a,b)
824 #define IMAPITable_GetRowCount(p,a,b) (p)->lpVtbl->GetRowCount(p,a,b)
825 #define IMAPITable_SeekRow(p,a,b) (p)->lpVtbl->SeekRow(p,a,b)
826 #define IMAPITable_SeekRowApprox(p,a,b) (p)->lpVtbl->SeekRowApprox(p,a,b)
827 #define IMAPITable_QueryPosition(p,a,b) (p)->lpVtbl->QueryPosition(p,a,b)
828 #define IMAPITable_FindRow(p,a,b,c) (p)->lpVtbl->FindRow(p,a,b,c)
829 #define IMAPITable_Restrict(p,a,b) (p)->lpVtbl->Recstrict(p,a,b)
830 #define IMAPITable_CreateBookmark(p,a) (p)->lpVtbl->CreateBookmark(p,a)
831 #define IMAPITable_FreeBookmark(p,a) (p)->lpVtbl->FreeBookmark(p,a)
832 #define IMAPITable_SortTable(p,a,b) (p)->lpVtbl->SortTable(p,a,b)
833 #define IMAPITable_QuerySortOrder(p,a) (p)->lpVtbl->QuerySortOrder(p,a)
834 #define IMAPITable_QueryRows(p,a,b,c) (p)->lpVtbl->QueryRows(p,a,b,c)
835 #define IMAPITable_Abort(p) (p)->lpVtbl->Abort(p)
836 #define IMAPITable_ExpandRow(p,a,b,c,d,e,f) (p)->lpVtbl->ExpandRow(p,a,b,c,d,e,f)
837 #define IMAPITable_CollapseRow(p,a,b,c,d) (p)->lpVtbl->CollapseRow(p,a,b,c,d)
838 #define IMAPITable_WaitForCompletion(p,a,b,c) (p)->lpVtbl->WaitForCompletion(p,a,b,c)
839 #define IMAPITable_GetCollapseState(p,a,b,c,d,e) (p)->lpVtbl->GetCollapseState(p,a,b,c,d,e)
840 #define IMAPITable_SetCollapseState(p,a,b,c,d) (p)->lpVtbl->SetCollapseState(p,a,b,c,d)
843 /*****************************************************************************
844 * IMAPIAdviseSink interface
846 #define INTERFACE IMAPIAdviseSink
847 DECLARE_INTERFACE_(IMAPIAdviseSink
,IUnknown
)
849 /*** IUnknown methods ***/
850 STDMETHOD_(HRESULT
,QueryInterface
)(THIS_ REFIID riid
, void** ppvObject
) PURE
;
851 STDMETHOD_(ULONG
,AddRef
)(THIS
) PURE
;
852 STDMETHOD_(ULONG
,Release
)(THIS
) PURE
;
853 /*** IMAPIAdviseSink methods ***/
854 STDMETHOD(OnNotify
)(THIS_ ULONG NumNotif
, LPNOTIFICATION lpNotif
) PURE
;
858 #if !defined(__cplusplus) || defined(CINTERFACE)
859 /*** IUnknown methods ***/
860 #define IMAPIAdviseSink_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
861 #define IMAPIAdviseSink_AddRef(p) (p)->lpVtbl->AddRef(p)
862 #define IMAPIAdviseSink_Release(p) (p)->lpVtbl->Release(p)
863 /*** IMAPIAdviseSink methods ***/
864 #define IMAPIAdviseSink_OnNotify(p,a,b) (p)->lpVtbl->OnNotify(p,a,b)
867 /*****************************************************************************
868 * IMAPIProp interface
870 #define INTERFACE IMAPIProp
871 DECLARE_INTERFACE_(IMAPIProp
,IUnknown
)
873 /*** IUnknown methods ***/
874 STDMETHOD_(HRESULT
,QueryInterface
)(THIS_ REFIID riid
, void** ppvObject
) PURE
;
875 STDMETHOD_(ULONG
,AddRef
)(THIS
) PURE
;
876 STDMETHOD_(ULONG
,Release
)(THIS
) PURE
;
877 /*** IMAPIProp methods ***/
878 STDMETHOD(GetLastError
)(THIS_ HRESULT hRes
, ULONG ulFlags
, LPMAPIERROR
*lppErr
) PURE
;
879 STDMETHOD(SaveChanges
)(THIS_ ULONG ulFlags
) PURE
;
880 STDMETHOD(GetProps
)(THIS_ LPSPropTagArray lpPropTags
, ULONG ulFlags
, ULONG
*lpValues
, LPSPropValue
*lppProps
) PURE
;
881 STDMETHOD(GetPropList
)(THIS_ ULONG ulFlags
, LPSPropTagArray
*lppPropTagArray
) PURE
;
882 STDMETHOD(OpenProperty
)(THIS_ ULONG ulPropTag
, LPCIID lpIid
, ULONG ulOpts
, ULONG ulFlags
, LPUNKNOWN
*lppUnk
) PURE
;
883 STDMETHOD(SetProps
)(THIS_ ULONG cValues
, LPSPropValue lpProps
, LPSPropProblemArray
*lppProbs
) PURE
;
884 STDMETHOD(DeleteProps
)(THIS_ LPSPropTagArray lpPropTags
, LPSPropProblemArray
*lppProbs
) PURE
;
885 STDMETHOD(CopyTo
)(THIS_ ULONG ciidExclude
, LPCIID lpIid
, LPSPropTagArray lpProps
, ULONG ulParam
,
886 LPMAPIPROGRESS lpProgress
, LPCIID lpIface
,LPVOID lpDest
, ULONG ulFlags
,
887 LPSPropProblemArray
*lppProbs
) PURE
;
888 STDMETHOD(CopyProps
)(THIS_ LPSPropTagArray lpIncludeProps
, ULONG ulParam
, LPMAPIPROGRESS lpProgress
,
889 LPCIID lpIid
, LPVOID lpDestObj
, ULONG ulFlags
, LPSPropProblemArray
*lppProblems
) PURE
;
890 STDMETHOD(GetNamesFromIDs
)(THIS_ LPSPropTagArray
*lppPropTags
, LPGUID lpIid
, ULONG ulFlags
, ULONG
*lpCount
,
891 LPMAPINAMEID
**lpppNames
) PURE
;
892 STDMETHOD(GetIDsFromNames
)(THIS_ ULONG cPropNames
, LPMAPINAMEID
*lppNames
, ULONG ulFlags
, LPSPropTagArray
*lppPropTags
) PURE
;
896 #if !defined(__cplusplus) || defined(CINTERFACE)
897 /*** IUnknown methods ***/
898 #define IMAPIProp_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
899 #define IMAPIProp_AddRef(p) (p)->lpVtbl->AddRef(p)
900 #define IMAPIProp_Release(p) (p)->lpVtbl->Release(p)
901 /*** IMAPIProp methods ***/
902 #define IMAPIProp_GetLastError(p,a,b,c) (p)->lpVtbl->GetLastError(p,a,b,c)
903 #define IMAPIProp_SaveChanges(p,a) (p)->lpVtbl->SaveChanges(p,a)
904 #define IMAPIProp_GetProps(p,a,b,c,d) (p)->lpVtbl->GetProps(p,a,b,c,d)
905 #define IMAPIProp_GetPropList(p,a,b) (p)->lpVtbl->GetPropList(p,a,b)
906 #define IMAPIProp_OpenProperty(p,a,b,c,d,e) (p)->lpVtbl->OpenProperty(p,a,b,c,d,e)
907 #define IMAPIProp_SetProps(p,a,b,c) (p)->lpVtbl->SetProps(p,a,b,c)
908 #define IMAPIProp_DeleteProps(p,a,b) (p)->lpVtbl->DeleteProps(p,a,b)
909 #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)
910 #define IMAPIProp_CopyProps(p,a,b,c,d,e,f,g) (p)->lpVtbl->CopyProps(p,a,b,c,d,e,f,g)
911 #define IMAPIProp_GetNamesFromIDs(p,a,b,c,d,e) (p)->lpVtbl->GetNamesFromIDs(p,a,b,c,d,e)
912 #define IMAPIProp_GetIDsFromNames(p,a,b,c,d) (p)->lpVtbl->GetIDsFromNames(p,a,b,c,d)
918 BYTE abEntry
[MAPI_DIM
];
919 } FLATENTRY
, *LPFLATENTRY
;
925 BYTE abEntries
[MAPI_DIM
];
926 } FLATENTRYLIST
, *LPFLATENTRYLIST
;
938 BYTE abMTSIDs
[MAPI_DIM
];
939 } FLATMTSIDLIST
, *LPFLATMTSIDLIST
;
941 typedef struct _ADRENTRY
945 LPSPropValue rgPropVals
;
946 } ADRENTRY
, *LPADRENTRY
;
948 typedef struct _ADRLIST
951 ADRENTRY aEntries
[MAPI_DIM
];
952 } ADRLIST
, *LPADRLIST
;
954 #endif /*MAPIDEFS_H*/