[1166] | 1 | /**
|
---|
| 2 | * This file has no copyright assigned and is placed in the Public Domain.
|
---|
| 3 | * This file is part of the mingw-w64 runtime package.
|
---|
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
---|
| 5 | */
|
---|
| 6 | #ifndef _MAPIUTIL_H_
|
---|
| 7 | #define _MAPIUTIL_H_
|
---|
| 8 |
|
---|
| 9 | #ifdef __cplusplus
|
---|
| 10 | extern "C" {
|
---|
| 11 | #endif
|
---|
| 12 |
|
---|
| 13 | #include <mapix.h>
|
---|
| 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 | STDAPI_(SCODE) CreateIProp(LPCIID lpInterface,ALLOCATEBUFFER *lpAllocateBuffer,ALLOCATEMORE *lpAllocateMore,FREEBUFFER *lpFreeBuffer,LPVOID lpvReserved,LPPROPDATA *lppPropData);
|
---|
| 50 |
|
---|
| 51 | #define IPROP_READONLY ((ULONG) 0x00000001)
|
---|
| 52 | #define IPROP_READWRITE ((ULONG) 0x00000002)
|
---|
| 53 | #define IPROP_CLEAN ((ULONG) 0x00010000)
|
---|
| 54 | #define IPROP_DIRTY ((ULONG) 0x00020000)
|
---|
| 55 |
|
---|
| 56 | #ifndef NOIDLEENGINE
|
---|
| 57 |
|
---|
| 58 | #define PRILOWEST -32768
|
---|
| 59 | #define PRIHIGHEST 32767
|
---|
| 60 | #define PRIUSER 0
|
---|
| 61 |
|
---|
| 62 | #define IRONULL ((USHORT) 0x0000)
|
---|
| 63 | #define FIROWAIT ((USHORT) 0x0001)
|
---|
| 64 | #define FIROINTERVAL ((USHORT) 0x0002)
|
---|
| 65 | #define FIROPERBLOCK ((USHORT) 0x0004)
|
---|
| 66 | #define FIRODISABLED ((USHORT) 0x0020)
|
---|
| 67 | #define FIROONCEONLY ((USHORT) 0x0040)
|
---|
| 68 |
|
---|
| 69 | #define IRCNULL ((USHORT) 0x0000)
|
---|
| 70 | #define FIRCPFN ((USHORT) 0x0001)
|
---|
| 71 | #define FIRCPV ((USHORT) 0x0002)
|
---|
| 72 | #define FIRCPRI ((USHORT) 0x0004)
|
---|
| 73 | #define FIRCCSEC ((USHORT) 0x0008)
|
---|
| 74 | #define FIRCIRO ((USHORT) 0x0010)
|
---|
| 75 |
|
---|
| 76 | typedef WINBOOL (WINAPI FNIDLE) (LPVOID);
|
---|
| 77 | typedef FNIDLE *PFNIDLE;
|
---|
| 78 | typedef void *FTG;
|
---|
| 79 | typedef FTG *PFTG;
|
---|
| 80 | #define FTGNULL ((FTG) NULL)
|
---|
| 81 |
|
---|
| 82 | STDAPI_(LONG) MAPIInitIdle (LPVOID lpvReserved);
|
---|
| 83 | STDAPI_(VOID) MAPIDeinitIdle (VOID);
|
---|
| 84 | STDAPI_(FTG) FtgRegisterIdleRoutine (PFNIDLE lpfnIdle,LPVOID lpvIdleParam,short priIdle,ULONG csecIdle,USHORT iroIdle);
|
---|
| 85 | STDAPI_(void) DeregisterIdleRoutine (FTG ftg);
|
---|
| 86 | STDAPI_(void) EnableIdleRoutine (FTG ftg,WINBOOL fEnable);
|
---|
| 87 | STDAPI_(void) ChangeIdleRoutine (FTG ftg,PFNIDLE lpfnIdle,LPVOID lpvIdleParam,short priIdle,ULONG csecIdle,USHORT iroIdle,USHORT ircIdle);
|
---|
| 88 | #endif
|
---|
| 89 |
|
---|
| 90 | STDAPI_(LPMALLOC) MAPIGetDefaultMalloc(VOID);
|
---|
| 91 |
|
---|
| 92 | #define SOF_UNIQUEFILENAME ((ULONG) 0x80000000)
|
---|
| 93 |
|
---|
| 94 | STDMETHODIMP OpenStreamOnFile(LPALLOCATEBUFFER lpAllocateBuffer,LPFREEBUFFER lpFreeBuffer,ULONG ulFlags,LPTSTR lpszFileName,LPTSTR lpszPrefix,LPSTREAM *lppStream);
|
---|
| 95 |
|
---|
| 96 | typedef HRESULT (WINAPI *LPOPENSTREAMONFILE) (LPALLOCATEBUFFER lpAllocateBuffer,LPFREEBUFFER lpFreeBuffer,ULONG ulFlags,LPTSTR lpszFileName,LPTSTR lpszPrefix,LPSTREAM *lppStream);
|
---|
| 97 |
|
---|
| 98 | #define OPENSTREAMONFILE "OpenStreamOnFile"
|
---|
| 99 |
|
---|
| 100 | STDAPI_(SCODE) PropCopyMore(LPSPropValue lpSPropValueDest,LPSPropValue lpSPropValueSrc,ALLOCATEMORE *lpfAllocMore,LPVOID lpvObject);
|
---|
| 101 | STDAPI_(ULONG) UlPropSize(LPSPropValue lpSPropValue);
|
---|
| 102 | STDAPI_(WINBOOL) FEqualNames(LPMAPINAMEID lpName1,LPMAPINAMEID lpName2);
|
---|
| 103 |
|
---|
| 104 | #if !defined(_WINNT) && !defined(_WIN95)
|
---|
| 105 | #define _WINNT
|
---|
| 106 | #endif
|
---|
| 107 |
|
---|
| 108 | STDAPI_(void) GetInstance(LPSPropValue lpPropMv,LPSPropValue lpPropSv,ULONG uliInst);
|
---|
| 109 |
|
---|
| 110 | extern char rgchCsds[];
|
---|
| 111 | extern char rgchCids[];
|
---|
| 112 | extern char rgchCsdi[];
|
---|
| 113 | extern char rgchCidi[];
|
---|
| 114 |
|
---|
| 115 | STDAPI_(WINBOOL) FPropContainsProp(LPSPropValue lpSPropValueDst,LPSPropValue lpSPropValueSrc,ULONG ulFuzzyLevel);
|
---|
| 116 | STDAPI_(WINBOOL) FPropCompareProp(LPSPropValue lpSPropValue1,ULONG ulRelOp,LPSPropValue lpSPropValue2);
|
---|
| 117 | STDAPI_(LONG) LPropCompareProp(LPSPropValue lpSPropValueA,LPSPropValue lpSPropValueB);
|
---|
| 118 | STDAPI_(HRESULT) HrAddColumns(LPMAPITABLE lptbl,LPSPropTagArray lpproptagColumnsNew,LPALLOCATEBUFFER lpAllocateBuffer,LPFREEBUFFER lpFreeBuffer);
|
---|
| 119 | STDAPI_(HRESULT) HrAddColumnsEx(LPMAPITABLE lptbl,LPSPropTagArray lpproptagColumnsNew,LPALLOCATEBUFFER lpAllocateBuffer,LPFREEBUFFER lpFreeBuffer,void (*lpfnFilterColumns)(LPSPropTagArray ptaga));
|
---|
| 120 | STDAPI HrAllocAdviseSink(LPNOTIFCALLBACK lpfnCallback,LPVOID lpvContext,LPMAPIADVISESINK *lppAdviseSink);
|
---|
| 121 | STDAPI HrThisThreadAdviseSink(LPMAPIADVISESINK lpAdviseSink,LPMAPIADVISESINK *lppAdviseSink);
|
---|
| 122 | STDAPI HrDispatchNotifications(ULONG ulFlags);
|
---|
| 123 |
|
---|
| 124 | typedef struct {
|
---|
| 125 | ULONG ulCtlType;
|
---|
| 126 | ULONG ulCtlFlags;
|
---|
| 127 | LPBYTE lpbNotif;
|
---|
| 128 | ULONG cbNotif;
|
---|
| 129 | LPTSTR lpszFilter;
|
---|
| 130 | ULONG ulItemID;
|
---|
| 131 | union {
|
---|
| 132 | LPVOID lpv;
|
---|
| 133 | LPDTBLLABEL lplabel;
|
---|
| 134 | LPDTBLEDIT lpedit;
|
---|
| 135 | LPDTBLLBX lplbx;
|
---|
| 136 | LPDTBLCOMBOBOX lpcombobox;
|
---|
| 137 | LPDTBLDDLBX lpddlbx;
|
---|
| 138 | LPDTBLCHECKBOX lpcheckbox;
|
---|
| 139 | LPDTBLGROUPBOX lpgroupbox;
|
---|
| 140 | LPDTBLBUTTON lpbutton;
|
---|
| 141 | LPDTBLRADIOBUTTON lpradiobutton;
|
---|
| 142 | LPDTBLMVLISTBOX lpmvlbx;
|
---|
| 143 | LPDTBLMVDDLBX lpmvddlbx;
|
---|
| 144 | LPDTBLPAGE lppage;
|
---|
| 145 | } ctl;
|
---|
| 146 | } DTCTL,*LPDTCTL;
|
---|
| 147 |
|
---|
| 148 | typedef struct {
|
---|
| 149 | ULONG cctl;
|
---|
| 150 | LPTSTR lpszResourceName;
|
---|
| 151 | __C89_NAMELESS union {
|
---|
| 152 | LPTSTR lpszComponent;
|
---|
| 153 | ULONG ulItemID;
|
---|
| 154 | };
|
---|
| 155 | LPDTCTL lpctl;
|
---|
| 156 | } DTPAGE,*LPDTPAGE;
|
---|
| 157 |
|
---|
| 158 | STDAPI BuildDisplayTable(LPALLOCATEBUFFER lpAllocateBuffer,LPALLOCATEMORE lpAllocateMore,LPFREEBUFFER lpFreeBuffer,LPMALLOC lpMalloc,HINSTANCE hInstance,UINT cPages,LPDTPAGE lpPage,ULONG ulFlags,LPMAPITABLE *lppTable,LPTABLEDATA *lppTblData);
|
---|
| 159 | STDAPI_(SCODE) ScCountNotifications(int cNotifications,LPNOTIFICATION lpNotifications,ULONG *lpcb);
|
---|
| 160 | STDAPI_(SCODE) ScCopyNotifications(int cNotification,LPNOTIFICATION lpNotifications,LPVOID lpvDst,ULONG *lpcb);
|
---|
| 161 | STDAPI_(SCODE) ScRelocNotifications(int cNotification,LPNOTIFICATION lpNotifications,LPVOID lpvBaseOld,LPVOID lpvBaseNew,ULONG *lpcb);
|
---|
| 162 | STDAPI_(SCODE) ScCountProps(int cValues,LPSPropValue lpPropArray,ULONG *lpcb);
|
---|
| 163 | STDAPI_(LPSPropValue) LpValFindProp(ULONG ulPropTag,ULONG cValues,LPSPropValue lpPropArray);
|
---|
| 164 | STDAPI_(SCODE) ScCopyProps(int cValues,LPSPropValue lpPropArray,LPVOID lpvDst,ULONG *lpcb);
|
---|
| 165 | STDAPI_(SCODE) ScRelocProps(int cValues,LPSPropValue lpPropArray,LPVOID lpvBaseOld,LPVOID lpvBaseNew,ULONG *lpcb);
|
---|
| 166 | STDAPI_(SCODE) ScDupPropset(int cValues,LPSPropValue lpPropArray,LPALLOCATEBUFFER lpAllocateBuffer,LPSPropValue *lppPropArray);
|
---|
| 167 | STDAPI_(ULONG) UlAddRef(LPVOID lpunk);
|
---|
| 168 | STDAPI_(ULONG) UlRelease(LPVOID lpunk);
|
---|
| 169 | STDAPI HrGetOneProp(LPMAPIPROP lpMapiProp,ULONG ulPropTag,LPSPropValue *lppProp);
|
---|
| 170 | STDAPI HrSetOneProp(LPMAPIPROP lpMapiProp,LPSPropValue lpProp);
|
---|
| 171 | STDAPI_(WINBOOL) FPropExists(LPMAPIPROP lpMapiProp,ULONG ulPropTag);
|
---|
| 172 | STDAPI_(LPSPropValue) PpropFindProp(LPSPropValue lpPropArray,ULONG cValues,ULONG ulPropTag);
|
---|
| 173 | STDAPI_(void) FreePadrlist(LPADRLIST lpAdrlist);
|
---|
| 174 | STDAPI_(void) FreeProws(LPSRowSet lpRows);
|
---|
| 175 | STDAPI HrQueryAllRows(LPMAPITABLE lpTable,LPSPropTagArray lpPropTags,LPSRestriction lpRestriction,LPSSortOrderSet lpSortOrderSet,LONG crowsMax,LPSRowSet *lppRows);
|
---|
| 176 |
|
---|
| 177 | #define MAPI_FORCE_CREATE 1
|
---|
| 178 | #define MAPI_FULL_IPM_TREE 2
|
---|
| 179 |
|
---|
| 180 | STDAPI HrValidateIPMSubtree(LPMDB lpMDB,ULONG ulFlags,ULONG *lpcValues,LPSPropValue *lppValues,LPMAPIERROR *lpperr);
|
---|
| 181 | STDAPI_(WINBOOL) FBinFromHex(LPTSTR lpsz,LPBYTE lpb);
|
---|
| 182 | STDAPI_(SCODE) ScBinFromHexBounded(LPTSTR lpsz,LPBYTE lpb,ULONG cb);
|
---|
| 183 | STDAPI_(void) HexFromBin(LPBYTE lpb,int cb,LPTSTR lpsz);
|
---|
| 184 | STDAPI_(ULONG) UlFromSzHex(LPCTSTR lpsz);
|
---|
| 185 | STDAPI HrEntryIDFromSz(LPTSTR lpsz,ULONG *lpcb,LPENTRYID *lppEntryID);
|
---|
| 186 | STDAPI HrSzFromEntryID(ULONG cb,LPENTRYID lpEntryID,LPTSTR *lpsz);
|
---|
| 187 | STDAPI HrComposeEID(LPMAPISESSION lpSession,ULONG cbStoreRecordKey,LPBYTE lpStoreRecordKey,ULONG cbMsgEntryID,LPENTRYID lpMsgEntryID,ULONG *lpcbEID,LPENTRYID *lppEntryID);
|
---|
| 188 | STDAPI HrDecomposeEID(LPMAPISESSION lpSession,ULONG cbEntryID,LPENTRYID lpEntryID,ULONG *lpcbStoreEntryID,LPENTRYID *lppStoreEntryID,ULONG *lpcbMsgEntryID,LPENTRYID *lppMsgEntryID);
|
---|
| 189 | STDAPI HrComposeMsgID(LPMAPISESSION lpSession,ULONG cbStoreSearchKey,LPBYTE pStoreSearchKey,ULONG cbMsgEntryID,LPENTRYID lpMsgEntryID,LPTSTR *lpszMsgID);
|
---|
| 190 | STDAPI HrDecomposeMsgID(LPMAPISESSION lpSession,LPTSTR lpszMsgID,ULONG *lpcbStoreEntryID,LPENTRYID *lppStoreEntryID,ULONG *lppcbMsgEntryID,LPENTRYID *lppMsgEntryID);
|
---|
| 191 | STDAPI_(LPTSTR) SzFindCh(LPCTSTR lpsz,USHORT ch);
|
---|
| 192 | STDAPI_(LPTSTR) SzFindLastCh(LPCTSTR lpsz,USHORT ch);
|
---|
| 193 | STDAPI_(LPTSTR) SzFindSz(LPCTSTR lpsz,LPCTSTR lpszKey);
|
---|
| 194 | STDAPI_(unsigned int) UFromSz(LPCTSTR lpsz);
|
---|
| 195 | STDAPI_(SCODE) ScUNCFromLocalPath(LPSTR lpszLocal,LPSTR lpszUNC,UINT cchUNC);
|
---|
| 196 | STDAPI_(SCODE) ScLocalPathFromUNC(LPSTR lpszUNC,LPSTR lpszLocal,UINT cchLocal);
|
---|
| 197 | STDAPI_(FILETIME) FtAddFt(FILETIME ftAddend1,FILETIME ftAddend2);
|
---|
| 198 | STDAPI_(FILETIME) FtMulDwDw(DWORD ftMultiplicand,DWORD ftMultiplier);
|
---|
| 199 | STDAPI_(FILETIME) FtMulDw(DWORD ftMultiplier,FILETIME ftMultiplicand);
|
---|
| 200 | STDAPI_(FILETIME) FtSubFt(FILETIME ftMinuend,FILETIME ftSubtrahend);
|
---|
| 201 | STDAPI_(FILETIME) FtNegFt(FILETIME ft);
|
---|
| 202 | STDAPI_(SCODE) ScCreateConversationIndex(ULONG cbParent,LPBYTE lpbParent,ULONG *lpcbConvIndex,LPBYTE *lppbConvIndex);
|
---|
| 203 | STDAPI WrapStoreEntryID(ULONG ulFlags,LPTSTR lpszDLLName,ULONG cbOrigEntry,LPENTRYID lpOrigEntry,ULONG *lpcbWrappedEntry,LPENTRYID *lppWrappedEntry);
|
---|
| 204 |
|
---|
| 205 | #define RTF_SYNC_RTF_CHANGED ((ULONG) 0x00000001)
|
---|
| 206 | #define RTF_SYNC_BODY_CHANGED ((ULONG) 0x00000002)
|
---|
| 207 |
|
---|
| 208 | STDAPI_(HRESULT) RTFSync(LPMESSAGE lpMessage,ULONG ulFlags,WINBOOL *lpfMessageUpdated);
|
---|
| 209 | STDAPI_(HRESULT) WrapCompressedRTFStream(LPSTREAM lpCompressedRTFStream,ULONG ulFlags,LPSTREAM *lpUncompressedRTFStream);
|
---|
| 210 | STDAPI_(HRESULT) HrIStorageFromStream(LPUNKNOWN lpUnkIn,LPCIID lpInterface,ULONG ulFlags,LPSTORAGE *lppStorageOut);
|
---|
| 211 | STDAPI_(SCODE) ScInitMapiUtil(ULONG ulFlags);
|
---|
| 212 | STDAPI_(VOID) DeinitMapiUtil(VOID);
|
---|
| 213 |
|
---|
| 214 | #ifdef _X86_
|
---|
| 215 | #define szHrDispatchNotifications "_HrDispatchNotifications@4"
|
---|
| 216 | #elif defined(_IA64_)
|
---|
| 217 | #define szHrDispatchNotifications "HrDispatchNotifications"
|
---|
| 218 | #endif
|
---|
| 219 |
|
---|
| 220 | typedef HRESULT (WINAPI DISPATCHNOTIFICATIONS)(ULONG ulFlags);
|
---|
| 221 | typedef DISPATCHNOTIFICATIONS *LPDISPATCHNOTIFICATIONS;
|
---|
| 222 |
|
---|
| 223 | #ifdef _X86_
|
---|
| 224 | #define szScCreateConversationIndex "_ScCreateConversationIndex@16"
|
---|
| 225 | #elif defined(_IA64_)
|
---|
| 226 | #define szScCreateConversationIndex "ScCreateConversationIndex"
|
---|
| 227 | #endif
|
---|
| 228 |
|
---|
| 229 | typedef SCODE (WINAPI CREATECONVERSATIONINDEX)(ULONG cbParent,LPBYTE lpbParent,ULONG *lpcbConvIndex,LPBYTE *lppbConvIndex);
|
---|
| 230 | typedef CREATECONVERSATIONINDEX *LPCREATECONVERSATIONINDEX;
|
---|
| 231 |
|
---|
| 232 | #ifdef __cplusplus
|
---|
| 233 | }
|
---|
| 234 | #endif
|
---|
| 235 | #endif
|
---|