source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/wabutil.h@ 1172

Last change on this file since 1172 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 10.4 KB
Line 
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#if !defined(_MAPIUTIL_H) && !defined(_WABUTIL_H)
7#define _WABUTIL_H
8
9#include "mapidefs.h"
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15#ifndef BEGIN_INTERFACE
16#define BEGIN_INTERFACE
17#endif
18
19 DECLARE_MAPI_INTERFACE_PTR(ITableData,LPTABLEDATA);
20
21 typedef void (WINAPI CALLERRELEASE)(ULONG ulCallerData,LPTABLEDATA lpTblData,LPMAPITABLE lpVue);
22
23#define MAPI_ITABLEDATA_METHODS(IPURE) MAPIMETHOD(HrGetView) (THIS_ LPSSortOrderSet lpSSortOrderSet,CALLERRELEASE *lpfCallerRelease,ULONG ulCallerData,LPMAPITABLE *lppMAPITable) IPURE; MAPIMETHOD(HrModifyRow) (THIS_ LPSRow) IPURE; MAPIMETHOD(HrDeleteRow) (THIS_ LPSPropValue lpSPropValue) IPURE; MAPIMETHOD(HrQueryRow) (THIS_ LPSPropValue lpsPropValue,LPSRow *lppSRow,ULONG *lpuliRow) IPURE; MAPIMETHOD(HrEnumRow) (THIS_ ULONG ulRowNumber,LPSRow *lppSRow) IPURE; MAPIMETHOD(HrNotify) (THIS_ ULONG ulFlags,ULONG cValues,LPSPropValue lpSPropValue) IPURE; MAPIMETHOD(HrInsertRow) (THIS_ ULONG uliRow,LPSRow lpSRow) IPURE; MAPIMETHOD(HrModifyRows) (THIS_ ULONG ulFlags,LPSRowSet lpSRowSet) IPURE; MAPIMETHOD(HrDeleteRows) (THIS_ ULONG ulFlags,LPSRowSet lprowsetToDelete,ULONG *cRowsDeleted) IPURE;
24#undef INTERFACE
25#define INTERFACE ITableData
26 DECLARE_MAPI_INTERFACE_(ITableData,IUnknown) {
27 BEGIN_INTERFACE
28 MAPI_IUNKNOWN_METHODS(PURE)
29 MAPI_ITABLEDATA_METHODS(PURE)
30 };
31
32 STDAPI_(SCODE) CreateTable(LPCIID lpInterface,ALLOCATEBUFFER *lpAllocateBuffer,ALLOCATEMORE *lpAllocateMore,FREEBUFFER *lpFreeBuffer,LPVOID lpvReserved,ULONG ulTableType,ULONG ulPropTagIndexColumn,LPSPropTagArray lpSPropTagArrayColumns,LPTABLEDATA *lppTableData);
33
34#define TAD_ALL_ROWS 1
35
36#define MAPI_IPROPDATA_METHODS(IPURE) MAPIMETHOD(HrSetObjAccess) (THIS_ ULONG ulAccess) IPURE; MAPIMETHOD(HrSetPropAccess) (THIS_ LPSPropTagArray lpPropTagArray,ULONG *rgulAccess) IPURE; MAPIMETHOD(HrGetPropAccess) (THIS_ LPSPropTagArray *lppPropTagArray,ULONG **lprgulAccess) IPURE; MAPIMETHOD(HrAddObjProps) (THIS_ LPSPropTagArray lppPropTagArray,LPSPropProblemArray *lprgulAccess) IPURE;
37
38#undef INTERFACE
39#define INTERFACE IPropData
40 DECLARE_MAPI_INTERFACE_(IPropData,IMAPIProp) {
41 BEGIN_INTERFACE
42 MAPI_IUNKNOWN_METHODS(PURE)
43 MAPI_IMAPIPROP_METHODS(PURE)
44 MAPI_IPROPDATA_METHODS(PURE)
45 };
46
47 DECLARE_MAPI_INTERFACE_PTR(IPropData,LPPROPDATA);
48
49#ifndef CreateIProp
50 STDAPI_(SCODE) CreateIProp(LPCIID lpInterface,ALLOCATEBUFFER *lpAllocateBuffer,ALLOCATEMORE *lpAllocateMore,FREEBUFFER *lpFreeBuffer,LPVOID lpvReserved,LPPROPDATA *lppPropData);
51#endif
52
53 STDAPI_(SCODE) WABCreateIProp(LPCIID lpInterface,ALLOCATEBUFFER *lpAllocateBuffer,ALLOCATEMORE *lpAllocateMore,FREEBUFFER *lpFreeBuffer,LPVOID lpvReserved,LPPROPDATA *lppPropData);
54
55#define IPROP_READONLY ((ULONG) 0x00000001)
56#define IPROP_READWRITE ((ULONG) 0x00000002)
57#define IPROP_CLEAN ((ULONG) 0x00010000)
58#define IPROP_DIRTY ((ULONG) 0x00020000)
59
60#ifndef NOIDLEENGINE
61
62#define PRILOWEST -32768
63#define PRIHIGHEST 32767
64#define PRIUSER 0
65
66#define IRONULL ((USHORT) 0x0000)
67#define FIROWAIT ((USHORT) 0x0001)
68#define FIROINTERVAL ((USHORT) 0x0002)
69#define FIROPERBLOCK ((USHORT) 0x0004)
70#define FIRODISABLED ((USHORT) 0x0020)
71#define FIROONCEONLY ((USHORT) 0x0040)
72
73#define IRCNULL ((USHORT) 0x0000)
74#define FIRCPFN ((USHORT) 0x0001)
75#define FIRCPV ((USHORT) 0x0002)
76#define FIRCPRI ((USHORT) 0x0004)
77#define FIRCCSEC ((USHORT) 0x0008)
78#define FIRCIRO ((USHORT) 0x0010)
79
80 typedef WINBOOL (WINAPI FNIDLE)(LPVOID);
81 typedef FNIDLE *PFNIDLE;
82
83 typedef void *FTG;
84 typedef FTG *PFTG;
85#define FTGNULL ((FTG) NULL)
86
87 STDAPI_(LONG) MAPIInitIdle(LPVOID lpvReserved);
88 STDAPI_(VOID) MAPIDeinitIdle(VOID);
89 STDAPI_(FTG) FtgRegisterIdleRoutine(PFNIDLE lpfnIdle,LPVOID lpvIdleParam,short priIdle,ULONG csecIdle,USHORT iroIdle);
90 STDAPI_(void) DeregisterIdleRoutine(FTG ftg);
91 STDAPI_(void) EnableIdleRoutine(FTG ftg,WINBOOL fEnable);
92 STDAPI_(void) ChangeIdleRoutine(FTG ftg,PFNIDLE lpfnIdle,LPVOID lpvIdleParam,short priIdle,ULONG csecIdle,USHORT iroIdle,USHORT ircIdle);
93#endif
94
95 STDAPI_(LPMALLOC) MAPIGetDefaultMalloc(VOID);
96
97#define SOF_UNIQUEFILENAME ((ULONG) 0x80000000)
98
99 STDMETHODIMP OpenStreamOnFile(LPALLOCATEBUFFER lpAllocateBuffer,LPFREEBUFFER lpFreeBuffer,ULONG ulFlags,LPTSTR lpszFileName,LPTSTR lpszPrefix,LPSTREAM *lppStream);
100
101 typedef HRESULT (WINAPI *LPOPENSTREAMONFILE) (LPALLOCATEBUFFER lpAllocateBuffer,LPFREEBUFFER lpFreeBuffer,ULONG ulFlags,LPTSTR lpszFileName,LPTSTR lpszPrefix,LPSTREAM *lppStream);
102
103#define OPENSTREAMONFILE "OpenStreamOnFile"
104
105 STDAPI_(SCODE) PropCopyMore(LPSPropValue lpSPropValueDest,LPSPropValue lpSPropValueSrc,ALLOCATEMORE *lpfAllocMore,LPVOID lpvObject);
106 STDAPI_(ULONG) UlPropSize(LPSPropValue lpSPropValue);
107 STDAPI_(WINBOOL) FEqualNames(LPMAPINAMEID lpName1,LPMAPINAMEID lpName2);
108
109#ifndef _WINNT
110#define _WINNT
111#endif
112
113 STDAPI_(void) GetInstance(LPSPropValue lpPropMv,LPSPropValue lpPropSv,ULONG uliInst);
114
115 extern unsigned char rgchCsds[];
116 extern unsigned char rgchCids[];
117 extern unsigned char rgchCsdi[];
118 extern unsigned char rgchCidi[];
119
120 STDAPI_(WINBOOL) FPropContainsProp(LPSPropValue lpSPropValueDst,LPSPropValue lpSPropValueSrc,ULONG ulFuzzyLevel);
121 STDAPI_(WINBOOL) FPropCompareProp(LPSPropValue lpSPropValue1,ULONG ulRelOp,LPSPropValue lpSPropValue2);
122 STDAPI_(LONG) LPropCompareProp(LPSPropValue lpSPropValueA,LPSPropValue lpSPropValueB);
123 STDAPI_(HRESULT) HrAddColumns(LPMAPITABLE lptbl,LPSPropTagArray lpproptagColumnsNew,LPALLOCATEBUFFER lpAllocateBuffer,LPFREEBUFFER lpFreeBuffer);
124 STDAPI_(HRESULT) HrAddColumnsEx(LPMAPITABLE lptbl,LPSPropTagArray lpproptagColumnsNew,LPALLOCATEBUFFER lpAllocateBuffer,LPFREEBUFFER lpFreeBuffer,void (*lpfnFilterColumns)(LPSPropTagArray ptaga));
125 STDAPI HrAllocAdviseSink(LPNOTIFCALLBACK lpfnCallback,LPVOID lpvContext,LPMAPIADVISESINK *lppAdviseSink);
126 STDAPI HrThisThreadAdviseSink(LPMAPIADVISESINK lpAdviseSink,LPMAPIADVISESINK *lppAdviseSink);
127 STDAPI HrDispatchNotifications(ULONG ulFlags);
128
129 typedef struct {
130 ULONG ulCtlType;
131 ULONG ulCtlFlags;
132 LPBYTE lpbNotif;
133 ULONG cbNotif;
134 LPTSTR lpszFilter;
135 ULONG ulItemID;
136 union {
137 LPVOID lpv;
138 LPDTBLLABEL lplabel;
139 LPDTBLEDIT lpedit;
140 LPDTBLLBX lplbx;
141 LPDTBLCOMBOBOX lpcombobox;
142 LPDTBLDDLBX lpddlbx;
143 LPDTBLCHECKBOX lpcheckbox;
144 LPDTBLGROUPBOX lpgroupbox;
145 LPDTBLBUTTON lpbutton;
146 LPDTBLRADIOBUTTON lpradiobutton;
147 LPDTBLMVLISTBOX lpmvlbx;
148 LPDTBLMVDDLBX lpmvddlbx;
149 LPDTBLPAGE lppage;
150 } ctl;
151 } DTCTL,*LPDTCTL;
152
153 typedef struct {
154 ULONG cctl;
155 LPTSTR lpszResourceName;
156 __C89_NAMELESS union {
157 LPTSTR lpszComponent;
158 ULONG ulItemID;
159 };
160 LPDTCTL lpctl;
161 } DTPAGE,*LPDTPAGE;
162
163 STDAPI BuildDisplayTable(LPALLOCATEBUFFER lpAllocateBuffer,LPALLOCATEMORE lpAllocateMore,LPFREEBUFFER lpFreeBuffer,LPMALLOC lpMalloc,HINSTANCE hInstance,UINT cPages,LPDTPAGE lpPage,ULONG ulFlags,LPMAPITABLE *lppTable,LPTABLEDATA *lppTblData);
164 STDAPI_(SCODE) ScCountNotifications(int cNotifications,LPNOTIFICATION lpNotifications,ULONG *lpcb);
165 STDAPI_(SCODE) ScCopyNotifications(int cNotification,LPNOTIFICATION lpNotifications,LPVOID lpvDst,ULONG *lpcb);
166 STDAPI_(SCODE) ScRelocNotifications(int cNotification,LPNOTIFICATION lpNotifications,LPVOID lpvBaseOld,LPVOID lpvBaseNew,ULONG *lpcb);
167 STDAPI_(SCODE) ScCountProps(int cValues,LPSPropValue lpPropArray,ULONG *lpcb);
168 STDAPI_(LPSPropValue) LpValFindProp(ULONG ulPropTag,ULONG cValues,LPSPropValue lpPropArray);
169 STDAPI_(SCODE) ScCopyProps(int cValues,LPSPropValue lpPropArray,LPVOID lpvDst,ULONG *lpcb);
170 STDAPI_(SCODE) ScRelocProps(int cValues,LPSPropValue lpPropArray,LPVOID lpvBaseOld,LPVOID lpvBaseNew,ULONG *lpcb);
171 STDAPI_(SCODE) ScDupPropset(int cValues,LPSPropValue lpPropArray,LPALLOCATEBUFFER lpAllocateBuffer,LPSPropValue *lppPropArray);
172 STDAPI_(ULONG) UlAddRef(LPVOID lpunk);
173 STDAPI_(ULONG) UlRelease(LPVOID lpunk);
174 STDAPI HrGetOneProp(LPMAPIPROP lpMapiProp,ULONG ulPropTag,LPSPropValue *lppProp);
175 STDAPI HrSetOneProp(LPMAPIPROP lpMapiProp,LPSPropValue lpProp);
176 STDAPI_(WINBOOL) FPropExists(LPMAPIPROP lpMapiProp,ULONG ulPropTag);
177 STDAPI_(LPSPropValue) PpropFindProp(LPSPropValue lpPropArray,ULONG cValues,ULONG ulPropTag);
178 STDAPI_(void) FreePadrlist(LPADRLIST lpAdrlist);
179 STDAPI_(void) FreeProws(LPSRowSet lpRows);
180 STDAPI HrQueryAllRows(LPMAPITABLE lpTable,LPSPropTagArray lpPropTags,LPSRestriction lpRestriction,LPSSortOrderSet lpSortOrderSet,LONG crowsMax,LPSRowSet *lppRows);
181 STDAPI_(LPTSTR) SzFindCh(LPCTSTR lpsz,USHORT ch);
182 STDAPI_(LPTSTR) SzFindLastCh(LPCTSTR lpsz,USHORT ch);
183 STDAPI_(LPTSTR) SzFindSz(LPCTSTR lpsz,LPCTSTR lpszKey);
184 STDAPI_(unsigned int) UFromSz(LPCTSTR lpsz);
185 STDAPI_(SCODE) ScUNCFromLocalPath(LPSTR lpszLocal,LPSTR lpszUNC,UINT cchUNC);
186 STDAPI_(SCODE) ScLocalPathFromUNC(LPSTR lpszUNC,LPSTR lpszLocal,UINT cchLocal);
187 STDAPI_(FILETIME) FtAddFt(FILETIME ftAddend1,FILETIME ftAddend2);
188 STDAPI_(FILETIME) FtMulDwDw(DWORD ftMultiplicand,DWORD ftMultiplier);
189 STDAPI_(FILETIME) FtMulDw(DWORD ftMultiplier,FILETIME ftMultiplicand);
190 STDAPI_(FILETIME) FtSubFt(FILETIME ftMinuend,FILETIME ftSubtrahend);
191 STDAPI_(FILETIME) FtNegFt(FILETIME ft);
192 STDAPI_(SCODE) ScCreateConversationIndex(ULONG cbParent,LPBYTE lpbParent,ULONG *lpcbConvIndex,LPBYTE *lppbConvIndex);
193 STDAPI WrapStoreEntryID(ULONG ulFlags,LPTSTR lpszDLLName,ULONG cbOrigEntry,LPENTRYID lpOrigEntry,ULONG *lpcbWrappedEntry,LPENTRYID *lppWrappedEntry);
194
195#define RTF_SYNC_RTF_CHANGED ((ULONG) 0x00000001)
196#define RTF_SYNC_BODY_CHANGED ((ULONG) 0x00000002)
197
198 STDAPI_(HRESULT) RTFSync (LPMESSAGE lpMessage,ULONG ulFlags,WINBOOL *lpfMessageUpdated);
199 STDAPI_(HRESULT) WrapCompressedRTFStream (LPSTREAM lpCompressedRTFStream,ULONG ulFlags,LPSTREAM *lpUncompressedRTFStream);
200 STDAPI_(HRESULT) HrIStorageFromStream (LPUNKNOWN lpUnkIn,LPCIID lpInterface,ULONG ulFlags,LPSTORAGE *lppStorageOut);
201 STDAPI_(SCODE) ScInitMapiUtil(ULONG ulFlags);
202 STDAPI_(VOID) DeinitMapiUtil(VOID);
203
204#ifdef _X86_
205#define szHrDispatchNotifications "_HrDispatchNotifications@4"
206#endif
207
208 typedef HRESULT (WINAPI DISPATCHNOTIFICATIONS)(ULONG ulFlags);
209 typedef DISPATCHNOTIFICATIONS *LPDISPATCHNOTIFICATIONS;
210
211#ifdef _X86_
212#define szScCreateConversationIndex "_ScCreateConversationIndex@16"
213#endif
214
215 typedef SCODE (WINAPI CREATECONVERSATIONINDEX)(ULONG cbParent,LPBYTE lpbParent,ULONG *lpcbConvIndex,LPBYTE *lppbConvIndex);
216 typedef CREATECONVERSATIONINDEX *LPCREATECONVERSATIONINDEX;
217
218#ifdef __cplusplus
219}
220#endif
221#endif
Note: See TracBrowser for help on using the repository browser.