3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync/*
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * Copyright 2004 Jon Griffiths
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync *
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * This library is free software; you can redistribute it and/or
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * modify it under the terms of the GNU Lesser General Public
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * License as published by the Free Software Foundation; either
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * version 2.1 of the License, or (at your option) any later version.
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync *
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * This library is distributed in the hope that it will be useful,
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * but WITHOUT ANY WARRANTY; without even the implied warranty of
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * Lesser General Public License for more details.
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync *
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * You should have received a copy of the GNU Lesser General Public
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * License along with this library; if not, write to the Free Software
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync */
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync/*
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync * a choice of LGPL license versions is made available with the language indicating
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync * that LGPLv2 or any later version may be used, or where a choice of which version
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync * of the LGPL is applied is otherwise unspecified.
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync */
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#ifndef MAPIUTIL_H_
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define MAPIUTIL_H_
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#include <mapix.h>
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#ifdef __cplusplus
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncextern "C" {
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#endif
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define TAD_ALL_ROWS 1 /* Delete all rows */
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncLPMALLOC WINAPI MAPIGetDefaultMalloc(void);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define SOF_UNIQUEFILENAME 0x80000000U /* Create a unique (temporary) filename */
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#if defined (UNICODE) || defined (__WINESRC__)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsynctypedef HRESULT (WINAPI * LPOPENSTREAMONFILE)(LPALLOCATEBUFFER,LPFREEBUFFER,
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync ULONG,LPWSTR,LPWSTR,LPSTREAM*);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncHRESULT WINAPI OpenStreamOnFile(LPALLOCATEBUFFER,LPFREEBUFFER,
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync ULONG,LPWSTR,LPWSTR,LPSTREAM*);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#else
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsynctypedef HRESULT (WINAPI * LPOPENSTREAMONFILE)(LPALLOCATEBUFFER,LPFREEBUFFER,
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync ULONG,LPSTR,LPSTR,LPSTREAM*);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncHRESULT WINAPI OpenStreamOnFile(LPALLOCATEBUFFER,LPFREEBUFFER,
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync ULONG,LPSTR,LPSTR,LPSTREAM*);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#endif
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define OPENSTREAMONFILE "OpenStreamOnFile"
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncBOOL WINAPI FEqualNames(LPMAPINAMEID,LPMAPINAMEID);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsynctypedef struct IPropData *LPPROPDATA;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPROP_READONLY 0x00001U
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPROP_READWRITE 0x00002U
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPROP_CLEAN 0x10000U
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPROP_DIRTY 0x20000U
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncSCODE WINAPI CreateIProp(LPCIID,ALLOCATEBUFFER*,ALLOCATEMORE*,FREEBUFFER*,
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync LPVOID,LPPROPDATA*);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncSCODE WINAPI PropCopyMore(LPSPropValue,LPSPropValue,ALLOCATEMORE*,LPVOID);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncULONG WINAPI UlPropSize(LPSPropValue);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncVOID WINAPI GetInstance(LPSPropValue,LPSPropValue,ULONG);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncBOOL WINAPI FPropContainsProp(LPSPropValue,LPSPropValue,ULONG);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncBOOL WINAPI FPropCompareProp(LPSPropValue,ULONG,LPSPropValue);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncLONG WINAPI LPropCompareProp(LPSPropValue,LPSPropValue);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncHRESULT WINAPI HrAddColumns(LPMAPITABLE,LPSPropTagArray,LPALLOCATEBUFFER,LPFREEBUFFER);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncHRESULT WINAPI HrAddColumnsEx(LPMAPITABLE,LPSPropTagArray,LPALLOCATEBUFFER,
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync LPFREEBUFFER,void (*)(LPSPropTagArray));
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncHRESULT WINAPI HrAllocAdviseSink(LPNOTIFCALLBACK,LPVOID,LPMAPIADVISESINK*);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncHRESULT WINAPI HrThisThreadAdviseSink(LPMAPIADVISESINK,LPMAPIADVISESINK*);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncHRESULT WINAPI HrDispatchNotifications (ULONG);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncULONG WINAPI UlAddRef(void*);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncULONG WINAPI UlRelease(void*);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncHRESULT WINAPI HrGetOneProp(LPMAPIPROP,ULONG,LPSPropValue*);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncHRESULT WINAPI HrSetOneProp(LPMAPIPROP,LPSPropValue);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncBOOL WINAPI FPropExists(LPMAPIPROP,ULONG);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncvoid WINAPI FreePadrlist(LPADRLIST);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncvoid WINAPI FreeProws(LPSRowSet);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncHRESULT WINAPI HrQueryAllRows(LPMAPITABLE,LPSPropTagArray,LPSRestriction,
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync LPSSortOrderSet,LONG,LPSRowSet*);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncLPSPropValue WINAPI PpropFindProp(LPSPropValue,ULONG,ULONG);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#if defined (UNICODE) || defined (__WINESRC__)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncBOOL WINAPI FBinFromHex(LPWSTR,LPBYTE);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncSCODE WINAPI ScBinFromHexBounded(LPWSTR,LPBYTE,ULONG);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncvoid WINAPI HexFromBin(LPBYTE,int,LPWSTR);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncULONG WINAPI UlFromSzHex(LPCWSTR);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncLPWSTR WINAPI SzFindCh(LPCWSTR,USHORT);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncLPWSTR WINAPI SzFindLastCh(LPCWSTR,USHORT);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncLPWSTR WINAPI SzFindSz(LPCWSTR,LPCWSTR);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncUINT WINAPI UFromSz(LPCSTR);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#else
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncBOOL WINAPI FBinFromHex(LPSTR,LPBYTE);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncSCODE WINAPI ScBinFromHexBounded(LPSTR,LPBYTE,ULONG);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncvoid WINAPI HexFromBin(LPBYTE,int,LPSTR);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncULONG WINAPI UlFromSzHex(LPCSTR);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncLPSTR WINAPI SzFindCh(LPCSTR,USHORT);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncLPSTR WINAPI SzFindLastCh(LPCSTR,USHORT);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncLPSTR WINAPI SzFindSz(LPCSTR,LPCSTR);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncUINT WINAPI UFromSz(LPCSTR);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#endif
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncSCODE WINAPI ScInitMapiUtil(ULONG);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncvoid WINAPI DeinitMapiUtil(void);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define szHrDispatchNotifications "_HrDispatchNotifications@4"
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define szScCreateConversationIndex "_ScCreateConversationIndex@16"
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsynctypedef HRESULT (WINAPI DISPATCHNOTIFICATIONS)(ULONG);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsynctypedef DISPATCHNOTIFICATIONS *LPDISPATCHNOTIFICATIONS;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsynctypedef SCODE (WINAPI CREATECONVERSATIONINDEX)(ULONG,LPBYTE,ULONG*,LPBYTE*);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsynctypedef CREATECONVERSATIONINDEX *LPCREATECONVERSATIONINDEX;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsynctypedef struct ITableData *LPTABLEDATA;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsynctypedef void (WINAPI CALLERRELEASE)(ULONG,LPTABLEDATA,LPMAPITABLE);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync/*****************************************************************************
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * ITableData interface
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync *
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * The underlying table data structure for IMAPITable.
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync */
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define INTERFACE ITableData
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncDECLARE_INTERFACE_(ITableData,IUnknown)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync{
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync /*** IUnknown methods ***/
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD_(ULONG,AddRef)(THIS) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD_(ULONG,Release)(THIS) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync /*** ITableData methods ***/
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(HrGetView)(THIS_ LPSSortOrderSet lpSort, CALLERRELEASE *lpRel,
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync ULONG ulData, LPMAPITABLE *lppTable) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(HrModifyRow)(THIS_ LPSRow lpRow) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(HrDeleteRow)(THIS_ LPSPropValue lpKey) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(HrQueryRow)(THIS_ LPSPropValue lpKey, LPSRow *lppRow, ULONG *lpRowNum) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(HrEnumRow)(THIS_ ULONG ulRowNum, LPSRow *lppRow) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(HrNotify)(THIS_ ULONG ulFlags, ULONG cValues, LPSPropValue lpValues) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(HrInsertRow)(THIS_ ULONG ulRow, LPSRow lpRow) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(HrModifyRows)(THIS_ ULONG ulFlags, LPSRowSet lpRows) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(HrDeleteRows)(THIS_ ULONG ulFlags, LPSRowSet lpRows, ULONG *lpCount) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync};
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#undef INTERFACE
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#if !defined(__cplusplus) || defined(CINTERFACE)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync /*** IUnknown methods ***/
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define ITableData_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define ITableData_AddRef(p) (p)->lpVtbl->AddRef(p)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define ITableData_Release(p) (p)->lpVtbl->Release(p)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync /*** ITableData methods ***/
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define ITableData_HrGetView(p,a,b,c,d) (p)->lpVtbl->HrGetView(p,a,b,c,d)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define ITableData_HrModifyRow(p,a) (p)->lpVtbl->HrModifyRow(p,a)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define ITableData_HrDeleteRow(p,a) (p)->lpVtbl->HrDeleteRow(p,a)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define ITableData_HrQueryRow(p,a,b,c) (p)->lpVtbl->HrQueryRow(p,a,b,c)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define ITableData_HrEnumRow(p,a,b) (p)->lpVtbl->HrEnumRow(p,a,b)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define ITableData_HrNotify(p,a,b,c) (p)->lpVtbl->HrNotify(p,a,b,c)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define ITableData_HrInsertRow(p,a,b) (p)->lpVtbl->HrInsertRow(p,a,b)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define ITableData_HrModifyRows(p,a,b) (p)->lpVtbl->HrModifyRows(p,a,b)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define ITableData_HrDeleteRows(p,a,b,c) (p)->lpVtbl->HrDeleteRows(p,a,b,c)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#endif
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncSCODE WINAPI CreateTable(LPCIID,ALLOCATEBUFFER*,ALLOCATEMORE*,FREEBUFFER*,
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync LPVOID,ULONG,ULONG,LPSPropTagArray,LPTABLEDATA*);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncSCODE WINAPI ScCountNotifications(int,LPNOTIFICATION,ULONG*);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncSCODE WINAPI ScCountProps(int,LPSPropValue,ULONG*);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncSCODE WINAPI ScCopyNotifications(int,LPNOTIFICATION,LPVOID,ULONG*);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncSCODE WINAPI ScCopyProps(int,LPSPropValue,LPVOID,ULONG*);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncSCODE WINAPI ScDupPropset(int,LPSPropValue,LPALLOCATEBUFFER,LPSPropValue*);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncSCODE WINAPI ScRelocNotifications(int,LPNOTIFICATION,LPVOID,LPVOID,ULONG*);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncSCODE WINAPI ScRelocProps(int,LPSPropValue,LPVOID,LPVOID,ULONG*);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncLPSPropValue WINAPI LpValFindProp(ULONG,ULONG,LPSPropValue);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncstatic inline FILETIME FtAddFt(FILETIME ftLeft, FILETIME ftRight)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync{
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync LONG64 *pl = (LONG64*)&ftLeft, *pr = (LONG64*)&ftRight;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync union { FILETIME ft; LONG64 ll; } ftmap;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync ftmap.ll = *pl + *pr;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync return ftmap.ft;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync}
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncstatic inline FILETIME FtSubFt(FILETIME ftLeft, FILETIME ftRight)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync{
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync LONG64 *pl = (LONG64*)&ftLeft, *pr = (LONG64*)&ftRight;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync union { FILETIME ft; LONG64 ll; } ftmap;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync ftmap.ll = *pl - *pr;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync return ftmap.ft;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync}
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncstatic inline FILETIME FtNegFt(FILETIME ftLeft)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync{
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync LONG64 *p = (LONG64*)&ftLeft;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync union { FILETIME ft; LONG64 ll; } ftmap;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync ftmap.ll = -*p;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync return ftmap.ft;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync}
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncstatic inline FILETIME FtMulDw(DWORD dwLeft, FILETIME ftRight)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync{
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync LONG64 l = (LONG64)dwLeft, *pr = (LONG64*)&ftRight;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync union { FILETIME ft; LONG64 ll; } ftmap;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync ftmap.ll = l * (*pr);
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync return ftmap.ft;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync}
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncstatic inline FILETIME FtMulDwDw(DWORD dwLeft, DWORD dwRight)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync{
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync LONG64 l = (LONG64)dwLeft, r = (LONG64)dwRight;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync union { FILETIME ft; LONG64 ll; } ftmap;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync ftmap.ll = l * r;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync return ftmap.ft;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync}
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync/*****************************************************************************
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync * IPropData interface
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync *
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync */
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define INTERFACE IPropData
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsyncDECLARE_INTERFACE_(IPropData,IMAPIProp)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync{
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync /*** IUnknown methods ***/
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD_(ULONG,AddRef)(THIS) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD_(ULONG,Release)(THIS) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync /*** IMAPIProp methods ***/
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(GetLastError)(THIS_ HRESULT hRes, ULONG ulFlags, LPMAPIERROR *lppErr) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(SaveChanges)(THIS_ ULONG ulFlags) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(GetProps)(THIS_ LPSPropTagArray lpPropTags, ULONG ulFlags, ULONG *lpValues, LPSPropValue *lppProps) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(GetPropList)(THIS_ ULONG ulFlags, LPSPropTagArray *lppPropTagArray) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(OpenProperty)(THIS_ ULONG ulPropTag, LPCIID lpIid, ULONG ulOpts, ULONG ulFlags, LPUNKNOWN *lppUnk) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(SetProps)(THIS_ ULONG cValues, LPSPropValue lpProps, LPSPropProblemArray *lppProbs) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(DeleteProps)(THIS_ LPSPropTagArray lpPropTags, LPSPropProblemArray *lppProbs) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(CopyTo)(THIS_ ULONG ciidExclude, LPCIID lpIid, LPSPropTagArray lpProps, ULONG ulParam,
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync LPMAPIPROGRESS lpProgress, LPCIID lpIface,LPVOID lpDest, ULONG ulFlags,
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync LPSPropProblemArray *lppProbs) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(CopyProps)(THIS_ LPSPropTagArray lpIncludeProps, ULONG ulParam, LPMAPIPROGRESS lpProgress,
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync LPCIID lpIid, LPVOID lpDestObj, ULONG ulFlags, LPSPropProblemArray *lppProblems) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(GetNamesFromIDs)(THIS_ LPSPropTagArray *lppPropTags, LPGUID lpIid, ULONG ulFlags, ULONG *lpCount,
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync LPMAPINAMEID **lpppNames) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(GetIDsFromNames)(THIS_ ULONG cPropNames, LPMAPINAMEID *lppNames, ULONG ulFlags, LPSPropTagArray *lppPropTags) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync /*** IPropData methods ***/
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(HrSetObjAccess)(THIS_ ULONG ulAccess) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(HrSetPropAccess)(THIS_ LPSPropTagArray lpPropTags, ULONG *lpAccess) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(HrGetPropAccess)(THIS_ LPSPropTagArray *lppPropTags, ULONG **lppAccess) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync STDMETHOD(HrAddObjProps)(THIS_ LPSPropTagArray lppPropTags, LPSPropProblemArray *lppProbs) PURE;
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync};
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#undef INTERFACE
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#if !defined(__cplusplus) || defined(CINTERFACE)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync /*** IUnknown methods ***/
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPropData_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPropData_AddRef(p) (p)->lpVtbl->AddRef(p)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPropData_Release(p) (p)->lpVtbl->Release(p)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync /*** IMAPIProp methods ***/
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPropData_GetLastError(p,a,b,c) (p)->lpVtbl->GetLastError(p,a,b,c)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPropData_SaveChanges(p,a) (p)->lpVtbl->SaveChanges(p,a)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPropData_GetProps(p,a,b,c,d) (p)->lpVtbl->GetProps(p,a,b,c,d)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPropData_GetPropList(p,a,b) (p)->lpVtbl->GetPropList(p,a,b)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPropData_OpenProperty(p,a,b,c,d,e) (p)->lpVtbl->OpenProperty(p,a,b,c,d,e)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPropData_SetProps(p,a,b,c) (p)->lpVtbl->SetProps(p,a,b,c)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPropData_DeleteProps(p,a,b) (p)->lpVtbl->DeleteProps(p,a,b)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPropData_CopyTo(p,a,b,c,d,e,f,g,h,i) (p)->lpVtbl->CopyTo(p,a,b,c,d,e,f,g,h,i)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPropData_CopyProps(p,a,b,c,d,e,f,g) (p)->lpVtbl->CopyProps(p,a,b,c,d,e,f,g)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPropData_GetNamesFromIDs(p,a,b,c,d,e) (p)->lpVtbl->GetNamesFromIDs(p,a,b,c,d,e)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPropData_GetIDsFromNames(p,a,b,c,d) (p)->lpVtbl->GetIDsFromNames(p,a,b,c,d)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPropData_HrSetObjAccess(p,a) (p)->lpVtbl->HrSetObjAccess(p,a)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPropData_HrSetPropAccess(p,a,b) (p)->lpVtbl->HrSetPropAccess(p,a,b)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPropData_HrGetPropAccess(p,a,b) (p)->lpVtbl->HrGetPropAccess(p,a,b)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#define IPropData_HrAddObjProps(p,a,b) (p)->lpVtbl->HrAddObjProps(p,a,b)
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#endif
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#ifdef __cplusplus
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync}
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#endif
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync
3194da424708abdd288b28d96892b3a5f3f7df0bvboxsync#endif /* MAPIUTIL_H_ */