ReactOS  0.4.13-dev-651-g5dbc677
mapix.h
Go to the documentation of this file.
1 /*
2  * Copyright 2004 Jon Griffiths
3  *
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.
8  *
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.
13  *
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18 
19 #ifndef MAPIX_H
20 #define MAPIX_H
21 
22 #include <mapidefs.h>
23 #include <mapicode.h>
24 #include <mapiguid.h>
25 #include <mapitags.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 typedef struct IProfAdmin IProfAdmin;
35 typedef struct IMAPISession *LPMAPISESSION;
36 
37 #ifndef WINE_FLAGS_DEFINED
38 #define WINE_FLAGS_DEFINED
39 typedef ULONG FLAGS;
40 #endif
41 
42 /* Flags for MAPILogon and MAPILogonEx */
43 #ifndef MAPI_LOGON_UI
44 #define MAPI_LOGON_UI 0x00000001
45 #endif
46 #ifndef MAPI_NEW_SESSION
47 #define MAPI_NEW_SESSION 0x00000002
48 #endif
49 #define MAPI_ALLOW_OTHERS 0x00000008
50 #define MAPI_EXPLICIT_PROFILE 0x00000010
51 #ifndef MAPI_EXTENDED
52 #define MAPI_EXTENDED 0x00000020
53 #endif
54 #ifndef MAPI_FORCE_DOWNLOAD
55 #define MAPI_FORCE_DOWNLOAD 0x00001000
56 #endif
57 #ifndef MAPI_PASSWORD_UI
58 #define MAPI_PASSWORD_UI 0x00020000
59 #endif
60 #define MAPI_SERVICE_UI_ALWAYS 0x00002000
61 #define MAPI_NO_MAIL 0x00008000
62 #define MAPI_NT_SERVICE 0x00010000
63 #define MAPI_TIMEOUT_SHORT 0x00100000
64 
65 #define MAPI_SIMPLE_DEFAULT (MAPI_LOGON_UI|MAPI_ALLOW_OTHERS|MAPI_FORCE_DOWNLOAD)
66 #define MAPI_SIMPLE_EXPLICIT (MAPI_NEW_SESSION|MAPI_EXPLICIT_PROFILE|MAPI_FORCE_DOWNLOAD)
67 
68 typedef struct tagMAPIINIT_0
69 {
73 
75 
76 #define MAPI_INIT_VERSION 0U
77 
78 typedef HRESULT (WINAPI MAPIINITIALIZE)(void*);
79 typedef MAPIINITIALIZE *LPMAPIINITIALIZE;
80 MAPIINITIALIZE MAPIInitialize;
81 
82 typedef void (WINAPI MAPIUNINITIALIZE)(void);
83 typedef MAPIUNINITIALIZE *LPMAPIUNINITIALIZE;
84 MAPIUNINITIALIZE MAPIUninitialize;
85 
86 #if defined (UNICODE) || defined (__WINESRC__)
88 #else
90 #endif
91 typedef MAPILOGONEX *LPMAPILOGONEX;
92 MAPILOGONEX MAPILogonEx;
93 
94 typedef SCODE (WINAPI MAPIALLOCATEBUFFER)(ULONG,LPVOID*);
95 typedef MAPIALLOCATEBUFFER *LPMAPIALLOCATEBUFFER;
96 MAPIALLOCATEBUFFER MAPIAllocateBuffer;
97 
98 typedef SCODE (WINAPI MAPIALLOCATEMORE)(ULONG,LPVOID,LPVOID*);
99 typedef MAPIALLOCATEMORE *LPMAPIALLOCATEMORE;
100 MAPIALLOCATEMORE MAPIAllocateMore;
101 
102 #ifndef MAPIFREEBUFFER_DEFINED
103 #define MAPIFREEBUFFER_DEFINED
104 typedef ULONG (WINAPI MAPIFREEBUFFER)(LPVOID);
105 typedef MAPIFREEBUFFER *LPMAPIFREEBUFFER;
106 MAPIFREEBUFFER MAPIFreeBuffer;
107 #endif
108 
109 typedef HRESULT (WINAPI MAPIADMINPROFILES)(ULONG,LPPROFADMIN*);
110 typedef MAPIADMINPROFILES *LPMAPIADMINPROFILES;
111 MAPIADMINPROFILES MAPIAdminProfiles;
112 
113 /*****************************************************************************
114  * IMAPISession interface
115  */
116 #define INTERFACE IMAPISession
118 {
119  /*** IUnknown methods ***/
123  /*** IMAPISession methods ***/
124  STDMETHOD(GetLastError)(THIS_ HRESULT hResult, ULONG ulFlags, LPMAPIERROR *lppMAPIError) PURE;
125  STDMETHOD(GetMsgStoresTable)(THIS_ ULONG ulFlags, LPMAPITABLE *lppTable) PURE;
126  STDMETHOD(OpenMsgStore)(THIS_ ULONG_PTR ulUIParam, ULONG cbId,
127  LPENTRYID lpId, LPCIID lpIFace, ULONG ulFlags, LPMDB *lppMDB) PURE;
128  STDMETHOD(OpenAddressBook)(THIS_ ULONG_PTR ulUIParam, LPCIID iid, ULONG ulFlags, LPADRBOOK *lppAdrBook) PURE;
129  STDMETHOD(OpenProfileSection)(THIS_ LPMAPIUID lpUID, LPCIID iid, ULONG ulFlags, LPPROFSECT *lppProf) PURE;
130  STDMETHOD(GetStatusTable)(THIS_ ULONG ulFlags, LPMAPITABLE *lppTable) PURE;
131  STDMETHOD(OpenEntry)(THIS_ ULONG cbId, LPENTRYID lpId, LPCIID iid,
132  ULONG ulFlags, ULONG *lpType, LPUNKNOWN *lppUnk) PURE;
133  STDMETHOD(CompareEntryIDs)(THIS_ ULONG cbLID, LPENTRYID lpLID, ULONG cbRID,
134  LPENTRYID lpRID, ULONG ulFlags, ULONG *lpRes) PURE;
135  STDMETHOD(Advise)(THIS_ ULONG cbId, LPENTRYID lpId, ULONG ulMask,
136  LPMAPIADVISESINK lpSink, ULONG *lpCxn) PURE;
137  STDMETHOD(Unadvise)(THIS_ ULONG ulConnection) PURE;
138  STDMETHOD(MessageOptions)(THIS_ ULONG_PTR ulUIParam, ULONG ulFlags, LPSTR lpszAddr, LPMESSAGE lpMsg) PURE;
139  STDMETHOD(QueryDefaultMessageOpt)(THIS_ LPSTR lpszAddr, ULONG ulFlags,
140  ULONG *lpcVals, LPSPropValue *lppOpts) PURE;
141  STDMETHOD(EnumAdrTypes)(THIS_ ULONG ulFlags, ULONG *lpcTypes, LPSTR **lpppszTypes) PURE;
142  STDMETHOD(QueryIdentity)(THIS_ ULONG *lpcbId, LPENTRYID *lppEntryID) PURE;
143  STDMETHOD(Logoff)(THIS_ ULONG_PTR ulUIParam, ULONG ulFlags, ULONG ulReserved) PURE;
144  STDMETHOD(SetDefaultStore)(THIS_ ULONG ulFlags, ULONG cbId, LPENTRYID lpId) PURE;
145  STDMETHOD(AdminServices)(THIS_ ULONG ulFlags, LPSERVICEADMIN *lppAdmin) PURE;
146  STDMETHOD(ShowForm)(THIS_ ULONG_PTR ulUIParam, LPMDB lpStore,
147  LPMAPIFOLDER lpParent, LPCIID iid, ULONG ulToken,
148  LPMESSAGE lpSent, ULONG ulFlags, ULONG ulStatus,
149  ULONG ulMsgFlags, ULONG ulAccess, LPSTR lpszClass) PURE;
150  STDMETHOD(PrepareForm)(THIS_ LPCIID lpIFace, LPMESSAGE lpMsg, ULONG *lpToken) PURE;
151 };
152 #undef INTERFACE
153 
154 #if !defined(__cplusplus) || defined(CINTERFACE)
155  /*** IUnknown methods ***/
156 #define IMAPISession_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
157 #define IMAPISession_AddRef(p) (p)->lpVtbl->AddRef(p)
158 #define IMAPISession_Release(p) (p)->lpVtbl->Release(p)
159  /*** IMAPISession methods ***/
160 #define IMAPISession_GetLastError(p,a,b,c) (p)->lpVtbl->GetLastError(p,a,b,c)
161 #define IMAPISession_GetMsgStoresTable(p,a,b) (p)->lpVtbl->GetMsgStoresTable(p,a,b)
162 #define IMAPISession_OpenMsgStore(p,a,b,c,d,e,f) (p)->lpVtbl->OpenMsgStore(p,a,b,c,d,e,f)
163 #define IMAPISession_OpenAddressBook(p,a,b,c,d) (p)->lpVtbl->OpenAddressBook(p,a,b,c,d)
164 #define IMAPISession_OpenProfileSection(p,a,b,c,d) (p)->lpVtbl->OpenProfileSection(p,a,b,c,d)
165 #define IMAPISession_GetStatusTable(p,a,b) (p)->lpVtbl->GetStatusTable(p,a,b)
166 #define IMAPISession_OpenEntry(p,a,b,c,d,e,f) (p)->lpVtbl->OpenEntry(p,a,b,c,d,e,f)
167 #define IMAPISession_CompareEntryIDs(p,a,b,c,d,e,f) (p)->lpVtbl->CompareEntryIDs(p,a,b,c,d,e,f)
168 #define IMAPISession_Advise(p,a,b,c,d,e) (p)->lpVtbl->Advise(p,a,b,c,d,e)
169 #define IMAPISession_Unadvise(p,a) (p)->lpVtbl->Unadvise(p,a)
170 #define IMAPISession_MessageOptions(p,a,b,c,d) (p)->lpVtbl->MessageOptions)(p,a,b,c,d)
171 #define IMAPISession_QueryDefaultMessageOpt(p,a,b,c,d) \
172  (p)->lpVtbl->QueryDefaultMessageOpt(p,a,b,c,d)
173 #define IMAPISession_EnumAdrTypes(p,a,b,c) (p)->lpVtbl->EnumAdrTypes(p,a,b,c)
174 #define IMAPISession_QueryIdentity(p,a,b) (p)->lpVtbl->QueryIdentity(p,a,b)
175 #define IMAPISession_Logoff(p,a,b,c) (p)->lpVtbl->Logoff(p,a,b,c)
176 #define IMAPISession_SetDefaultStore(p,a,b,c) (p)->lpVtbl->SetDefaultStore(p,a,b,c)
177 #define IMAPISession_AdminServices(p,a,b) (p)->lpVtbl->AdminServices(p,a,b)
178 #define IMAPISession_ShowForm(p,a,b,c,d,e,f,g,h,i,j,k) \
179  (p)->lpVtbl->ShowForm(p,a,b,c,d,e,f,g,h,i,j,k)
180 #define IMAPISession_PrepareForm(p,a,b,c) (p)->lpVtbl->PrepareForm(p,a,b,c)
181 #endif
182 
183 #ifdef __cplusplus
184 }
185 #endif
186 
187 #endif /* MAPIX_H */
typedef LPVOID
Definition: mapix.h:98
LPVOID *typedef MAPIALLOCATEBUFFER * LPMAPIALLOCATEBUFFER
Definition: mapix.h:94
struct IMsgServiceAdmin IMsgServiceAdmin
Definition: mapix.h:33
#define REFIID
Definition: guiddef.h:113
typedef void(WINAPI MAPIUNINITIALIZE)(void)
typedef SCODE(WINAPI MAPIALLOCATEBUFFER)(ULONG
#define THIS_
Definition: basetyps.h:65
struct tagMAPIINIT_0 MAPIINIT_0
_In_ BOOLEAN Release
Definition: classpnp.h:929
#define THIS
Definition: basetyps.h:66
MAPIADMINPROFILES MAPIAdminProfiles
Definition: mapix.h:111
REFIID riid
Definition: precomp.h:44
MAPIINIT_0 MAPIINIT
Definition: mapix.h:74
LPVOID *typedef MAPIALLOCATEMORE * LPMAPIALLOCATEMORE
Definition: mapix.h:98
IMAPITable * LPMAPITABLE
Definition: mapidefs.h:840
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
IMsgStore * LPMDB
Definition: mapidefs.h:1001
NTSTATUS QueryInterface(IN PDEVICE_OBJECT DeviceObject, IN CONST GUID InterfaceType, IN LONG Size, IN LONG Version, OUT PVOID Interface)
Definition: fdo.c:532
char * LPSTR
Definition: xmlstorage.h:182
#define STDMETHOD(m)
Definition: basetyps.h:62
struct IMAPIFolder * LPMAPIFOLDER
Definition: mapidefs.h:94
uint32_t ULONG_PTR
Definition: typedefs.h:63
typedef ULONG
Definition: mapix.h:89
static LPUNKNOWN
Definition: ndr_ole.c:49
struct IMessage * LPMESSAGE
Definition: mapidefs.h:99
MAPIUNINITIALIZE MAPIUninitialize
Definition: mapix.h:84
DECLARE_INTERFACE_(IMAPISession, IUnknown)
Definition: mapix.h:117
MAPIFREEBUFFER MAPIFreeBuffer
Definition: mapix.h:106
MAPILOGONEX MAPILogonEx
Definition: mapix.h:92
struct IMAPIAdviseSink * LPMAPIADVISESINK
Definition: mapidefs.h:92
typedef LPSTR
Definition: mapix.h:89
ULONG ulVersion
Definition: mapix.h:70
IAddrBook * LPADRBOOK
Definition: mapidefs.h:84
IProfAdmin * LPPROFADMIN
Definition: mapix.h:32
IMsgServiceAdmin * LPSERVICEADMIN
Definition: mapix.h:34
LONG HRESULT
Definition: typedefs.h:77
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_ RECTL _In_ ULONG _In_ ULONG ulReserved
Definition: winddi.h:4190
LPMAPISESSION *typedef MAPILOGONEX * LPMAPILOGONEX
Definition: mapix.h:89
#define WINAPI
Definition: msvc.h:8
struct IMAPISession * LPMAPISESSION
Definition: mapix.h:35
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
MAPIINIT_0 * LPMAPIINIT
Definition: mapix.h:74
MAPIALLOCATEMORE MAPIAllocateMore
Definition: mapix.h:100
REFIID LPVOID * ppvObject
Definition: precomp.h:44
MAPIINITIALIZE * LPMAPIINITIALIZE
Definition: mapix.h:79
ULONG ulFlags
Definition: mapix.h:71
MAPIALLOCATEBUFFER MAPIAllocateBuffer
Definition: mapix.h:96
#define PURE
Definition: basetyps.h:64
IProfSect * LPPROFSECT
Definition: mapidefs.h:101
struct tagMAPIINIT_0 * LPMAPIINIT_0
LPPROFADMIN *typedef MAPIADMINPROFILES * LPMAPIADMINPROFILES
Definition: mapix.h:109
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:90
ULONG FLAGS
Definition: mapix.h:39
MAPIINITIALIZE MAPIInitialize
Definition: mapix.h:80
unsigned int ULONG
Definition: retypes.h:1
#define ULONG_PTR
Definition: config.h:101
MAPIUNINITIALIZE * LPMAPIUNINITIALIZE
Definition: mapix.h:83
WCHAR * LPWSTR
Definition: xmlstorage.h:184
struct IProfAdmin IProfAdmin
Definition: mapix.h:31
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
MAPIFREEBUFFER * LPMAPIFREEBUFFER
Definition: mapix.h:105
typedef HRESULT(WINAPI MAPIINITIALIZE)(void *)