source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/mapix.h@ 1167

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

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

File size: 10.6 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#ifndef MAPIX_H
7#define MAPIX_H
8
9#include <mapidefs.h>
10#include <mapicode.h>
11#include <mapiguid.h>
12#include <mapitags.h>
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18#ifndef BEGIN_INTERFACE
19#define BEGIN_INTERFACE
20#endif
21
22 DECLARE_MAPI_INTERFACE_PTR(IProfAdmin,LPPROFADMIN);
23 DECLARE_MAPI_INTERFACE_PTR(IMsgServiceAdmin,LPSERVICEADMIN);
24 DECLARE_MAPI_INTERFACE_PTR(IMAPISession,LPMAPISESSION);
25
26 typedef ULONG FLAGS;
27
28#define MAPI_LOGON_UI 0x00000001
29#define MAPI_NEW_SESSION 0x00000002
30#define MAPI_ALLOW_OTHERS 0x00000008
31#define MAPI_EXPLICIT_PROFILE 0x00000010
32#define MAPI_EXTENDED 0x00000020
33#define MAPI_FORCE_DOWNLOAD 0x00001000
34#define MAPI_SERVICE_UI_ALWAYS 0x00002000
35#define MAPI_NO_MAIL 0x00008000
36
37#ifndef MAPI_PASSWORD_UI
38#define MAPI_PASSWORD_UI 0x00020000
39#endif
40#define MAPI_TIMEOUT_SHORT 0x00100000
41
42#define MAPI_SIMPLE_DEFAULT (MAPI_LOGON_UI | MAPI_FORCE_DOWNLOAD | MAPI_ALLOW_OTHERS)
43#define MAPI_SIMPLE_EXPLICIT (MAPI_NEW_SESSION | MAPI_FORCE_DOWNLOAD | MAPI_EXPLICIT_PROFILE)
44
45 typedef struct {
46 ULONG ulVersion;
47 ULONG ulFlags;
48 } MAPIINIT_0,*LPMAPIINIT_0;
49
50 typedef MAPIINIT_0 MAPIINIT;
51 typedef MAPIINIT *LPMAPIINIT;
52
53#define MAPI_INIT_VERSION 0
54
55#define MAPI_MULTITHREAD_NOTIFICATIONS 0x00000001
56
57 typedef HRESULT (WINAPI MAPIINITIALIZE)(LPVOID lpMapiInit);
58 typedef MAPIINITIALIZE *LPMAPIINITIALIZE;
59 typedef void (WINAPI MAPIUNINITIALIZE)(void);
60 typedef MAPIUNINITIALIZE *LPMAPIUNINITIALIZE;
61
62 MAPIINITIALIZE MAPIInitialize;
63 MAPIUNINITIALIZE MAPIUninitialize;
64
65 typedef HRESULT (WINAPI MAPILOGONEX)(ULONG_PTR ulUIParam,LPTSTR lpszProfileName,LPTSTR lpszPassword,ULONG ulFlags,LPMAPISESSION *lppSession);
66 typedef MAPILOGONEX *LPMAPILOGONEX;
67
68 MAPILOGONEX MAPILogonEx;
69
70 typedef SCODE (WINAPI MAPIALLOCATEBUFFER)(ULONG cbSize,LPVOID *lppBuffer);
71 typedef SCODE (WINAPI MAPIALLOCATEMORE)(ULONG cbSize,LPVOID lpObject,LPVOID *lppBuffer);
72 typedef ULONG (WINAPI MAPIFREEBUFFER)(LPVOID lpBuffer);
73 typedef MAPIALLOCATEBUFFER *LPMAPIALLOCATEBUFFER;
74 typedef MAPIALLOCATEMORE *LPMAPIALLOCATEMORE;
75 typedef MAPIFREEBUFFER *LPMAPIFREEBUFFER;
76
77 MAPIALLOCATEBUFFER MAPIAllocateBuffer;
78 MAPIALLOCATEMORE MAPIAllocateMore;
79 MAPIFREEBUFFER MAPIFreeBuffer;
80
81 typedef HRESULT (WINAPI MAPIADMINPROFILES)(ULONG ulFlags,LPPROFADMIN *lppProfAdmin);
82 typedef MAPIADMINPROFILES *LPMAPIADMINPROFILES;
83
84 MAPIADMINPROFILES MAPIAdminProfiles;
85
86#define MAPI_LOGOFF_SHARED 0x00000001
87#define MAPI_LOGOFF_UI 0x00000002
88
89#define MAPI_DEFAULT_STORE 0x00000001
90#define MAPI_SIMPLE_STORE_TEMPORARY 0x00000002
91#define MAPI_SIMPLE_STORE_PERMANENT 0x00000003
92#define MAPI_PRIMARY_STORE 0x00000004
93#define MAPI_SECONDARY_STORE 0x00000005
94
95#define MAPI_POST_MESSAGE 0x00000001
96#define MAPI_NEW_MESSAGE 0x00000002
97
98#define MAPI_IMAPISESSION_METHODS(IPURE) MAPIMETHOD(GetLastError) (THIS_ HRESULT hResult,ULONG ulFlags,LPMAPIERROR *lppMAPIError) IPURE; MAPIMETHOD(GetMsgStoresTable) (THIS_ ULONG ulFlags,LPMAPITABLE *lppTable) IPURE; MAPIMETHOD(OpenMsgStore) (THIS_ ULONG_PTR ulUIParam,ULONG cbEntryID,LPENTRYID lpEntryID,LPCIID lpInterface,ULONG ulFlags,LPMDB *lppMDB) IPURE; MAPIMETHOD(OpenAddressBook) (THIS_ ULONG_PTR ulUIParam,LPCIID lpInterface,ULONG ulFlags,LPADRBOOK *lppAdrBook) IPURE; MAPIMETHOD(OpenProfileSection) (THIS_ LPMAPIUID lpUID,LPCIID lpInterface,ULONG ulFlags,LPPROFSECT *lppProfSect) IPURE; MAPIMETHOD(GetStatusTable) (THIS_ ULONG ulFlags,LPMAPITABLE *lppTable) IPURE; MAPIMETHOD(OpenEntry) (THIS_ ULONG cbEntryID,LPENTRYID lpEntryID,LPCIID lpInterface,ULONG ulFlags,ULONG *lpulObjType,LPUNKNOWN *lppUnk) IPURE; MAPIMETHOD(CompareEntryIDs) (THIS_ ULONG cbEntryID1,LPENTRYID lpEntryID1,ULONG cbEntryID2,LPENTRYID lpEntryID2,ULONG ulFlags,ULONG *lpulResult) IPURE; MAPIMETHOD(Advise) (THIS_ ULONG cbEntryID,LPENTRYID lpEntryID,ULONG ulEventMask,LPMAPIADVISESINK lpAdviseSink,ULONG *lpulConnection) IPURE; MAPIMETHOD(Unadvise) (THIS_ ULONG ulConnection) IPURE; MAPIMETHOD(MessageOptions) (THIS_ ULONG_PTR ulUIParam,ULONG ulFlags,LPTSTR lpszAdrType,LPMESSAGE lpMessage) IPURE; MAPIMETHOD(QueryDefaultMessageOpt) (THIS_ LPTSTR lpszAdrType,ULONG ulFlags,ULONG *lpcValues,LPSPropValue *lppOptions) IPURE; MAPIMETHOD(EnumAdrTypes) (THIS_ ULONG ulFlags,ULONG *lpcAdrTypes,LPTSTR **lpppszAdrTypes) IPURE; MAPIMETHOD(QueryIdentity) (THIS_ ULONG *lpcbEntryID,LPENTRYID *lppEntryID) IPURE; MAPIMETHOD(Logoff) (THIS_ ULONG_PTR ulUIParam,ULONG ulFlags,ULONG ulReserved) IPURE; MAPIMETHOD(SetDefaultStore) (THIS_ ULONG ulFlags,ULONG cbEntryID,LPENTRYID lpEntryID) IPURE; MAPIMETHOD(AdminServices) (THIS_ ULONG ulFlags,LPSERVICEADMIN *lppServiceAdmin) IPURE; MAPIMETHOD(ShowForm) (THIS_ ULONG_PTR ulUIParam,LPMDB lpMsgStore,LPMAPIFOLDER lpParentFolder,LPCIID lpInterface,ULONG ulMessageToken,LPMESSAGE lpMessageSent,ULONG ulFlags,ULONG ulMessageStatus,ULONG ulMessageFlags,ULONG ulAccess,LPSTR lpszMessageClass) IPURE; MAPIMETHOD(PrepareForm) (THIS_ LPCIID lpInterface,LPMESSAGE lpMessage,ULONG *lpulMessageToken) IPURE;
99
100#undef INTERFACE
101#define INTERFACE IMAPISession
102 DECLARE_MAPI_INTERFACE_(IMAPISession,IUnknown) {
103 BEGIN_INTERFACE
104 MAPI_IUNKNOWN_METHODS(PURE)
105 MAPI_IMAPISESSION_METHODS(PURE)
106 };
107
108#define MAPI_IADDRBOOK_METHODS(IPURE) MAPIMETHOD(OpenEntry) (THIS_ ULONG cbEntryID,LPENTRYID lpEntryID,LPCIID lpInterface,ULONG ulFlags,ULONG *lpulObjType,LPUNKNOWN *lppUnk) IPURE; MAPIMETHOD(CompareEntryIDs) (THIS_ ULONG cbEntryID1,LPENTRYID lpEntryID1,ULONG cbEntryID2,LPENTRYID lpEntryID2,ULONG ulFlags,ULONG *lpulResult) IPURE; MAPIMETHOD(Advise) (THIS_ ULONG cbEntryID,LPENTRYID lpEntryID,ULONG ulEventMask,LPMAPIADVISESINK lpAdviseSink,ULONG *lpulConnection) IPURE; MAPIMETHOD(Unadvise) (THIS_ ULONG ulConnection) IPURE; MAPIMETHOD(CreateOneOff) (THIS_ LPTSTR lpszName,LPTSTR lpszAdrType,LPTSTR lpszAddress,ULONG ulFlags,ULONG *lpcbEntryID,LPENTRYID *lppEntryID) IPURE; MAPIMETHOD(NewEntry) (THIS_ ULONG_PTR ulUIParam,ULONG ulFlags,ULONG cbEIDContainer,LPENTRYID lpEIDContainer,ULONG cbEIDNewEntryTpl,LPENTRYID lpEIDNewEntryTpl,ULONG *lpcbEIDNewEntry,LPENTRYID *lppEIDNewEntry) IPURE; MAPIMETHOD(ResolveName) (THIS_ ULONG_PTR ulUIParam,ULONG ulFlags,LPTSTR lpszNewEntryTitle,LPADRLIST lpAdrList) IPURE; MAPIMETHOD(Address) (THIS_ ULONG_PTR *lpulUIParam,LPADRPARM lpAdrParms,LPADRLIST *lppAdrList) IPURE; MAPIMETHOD(Details) (THIS_ ULONG *lpulUIParam,LPFNDISMISS lpfnDismiss,LPVOID lpvDismissContext,ULONG cbEntryID,LPENTRYID lpEntryID,LPFNBUTTON lpfButtonCallback,LPVOID lpvButtonContext,LPTSTR lpszButtonText,ULONG ulFlags) IPURE; MAPIMETHOD(RecipOptions) (THIS_ ULONG_PTR ulUIParam,ULONG ulFlags,LPADRENTRY lpRecip) IPURE; MAPIMETHOD(QueryDefaultRecipOpt) (THIS_ LPTSTR lpszAdrType,ULONG ulFlags,ULONG *lpcValues,LPSPropValue *lppOptions) IPURE; MAPIMETHOD(GetPAB) (THIS_ ULONG *lpcbEntryID,LPENTRYID *lppEntryID) IPURE; MAPIMETHOD(SetPAB) (THIS_ ULONG cbEntryID,LPENTRYID lpEntryID) IPURE; MAPIMETHOD(GetDefaultDir) (THIS_ ULONG *lpcbEntryID,LPENTRYID *lppEntryID) IPURE; MAPIMETHOD(SetDefaultDir) (THIS_ ULONG cbEntryID,LPENTRYID lpEntryID) IPURE; MAPIMETHOD(GetSearchPath) (THIS_ ULONG ulFlags,LPSRowSet *lppSearchPath) IPURE; MAPIMETHOD(SetSearchPath) (THIS_ ULONG ulFlags,LPSRowSet lpSearchPath) IPURE; MAPIMETHOD(PrepareRecips) (THIS_ ULONG ulFlags,LPSPropTagArray lpPropTagArray,LPADRLIST lpRecipList) IPURE;
109#undef INTERFACE
110#define INTERFACE IAddrBook
111 DECLARE_MAPI_INTERFACE_(IAddrBook,IMAPIProp) {
112 BEGIN_INTERFACE
113 MAPI_IUNKNOWN_METHODS(PURE)
114 MAPI_IMAPIPROP_METHODS(PURE)
115 MAPI_IADDRBOOK_METHODS(PURE)
116 };
117
118 DECLARE_MAPI_INTERFACE_PTR(IAddrBook,LPADRBOOK);
119
120#define MAPI_DEFAULT_SERVICES 0x00000001
121
122#define MAPI_IPROFADMIN_METHODS(IPURE) MAPIMETHOD(GetLastError) (THIS_ HRESULT hResult,ULONG ulFlags,LPMAPIERROR *lppMAPIError) IPURE; MAPIMETHOD(GetProfileTable) (THIS_ ULONG ulFlags,LPMAPITABLE *lppTable) IPURE; MAPIMETHOD(CreateProfile) (THIS_ LPTSTR lpszProfileName,LPTSTR lpszPassword,ULONG_PTR ulUIParam,ULONG ulFlags) IPURE; MAPIMETHOD(DeleteProfile) (THIS_ LPTSTR lpszProfileName,ULONG ulFlags) IPURE; MAPIMETHOD(ChangeProfilePassword) (THIS_ LPTSTR lpszProfileName,LPTSTR lpszOldPassword,LPTSTR lpszNewPassword,ULONG ulFlags) IPURE; MAPIMETHOD(CopyProfile) (THIS_ LPTSTR lpszOldProfileName,LPTSTR lpszOldPassword,LPTSTR lpszNewProfileName,ULONG_PTR ulUIParam,ULONG ulFlags) IPURE; MAPIMETHOD(RenameProfile) (THIS_ LPTSTR lpszOldProfileName,LPTSTR lpszOldPassword,LPTSTR lpszNewProfileName,ULONG_PTR ulUIParam,ULONG ulFlags) IPURE; MAPIMETHOD(SetDefaultProfile) (THIS_ LPTSTR lpszProfileName,ULONG ulFlags) IPURE; MAPIMETHOD(AdminServices) (THIS_ LPTSTR lpszProfileName,LPTSTR lpszPassword,ULONG_PTR ulUIParam,ULONG ulFlags,LPSERVICEADMIN *lppServiceAdmin) IPURE;
123
124#undef INTERFACE
125#define INTERFACE IProfAdmin
126 DECLARE_MAPI_INTERFACE_(IProfAdmin,IUnknown) {
127 BEGIN_INTERFACE
128 MAPI_IUNKNOWN_METHODS(PURE)
129 MAPI_IPROFADMIN_METHODS(PURE)
130 };
131
132#define SERVICE_DEFAULT_STORE 0x00000001
133#define SERVICE_SINGLE_COPY 0x00000002
134#define SERVICE_CREATE_WITH_STORE 0x00000004
135#define SERVICE_PRIMARY_IDENTITY 0x00000008
136#define SERVICE_NO_PRIMARY_IDENTITY 0x00000020
137
138#define MAPI_IMSGSERVICEADMIN_METHODS(IPURE) MAPIMETHOD(GetLastError) (THIS_ HRESULT hResult,ULONG ulFlags,LPMAPIERROR *lppMAPIError) IPURE; MAPIMETHOD(GetMsgServiceTable) (THIS_ ULONG ulFlags,LPMAPITABLE *lppTable) IPURE; MAPIMETHOD(CreateMsgService) (THIS_ LPTSTR lpszService,LPTSTR lpszDisplayName,ULONG_PTR ulUIParam,ULONG ulFlags) IPURE; MAPIMETHOD(DeleteMsgService) (THIS_ LPMAPIUID lpUID) IPURE; MAPIMETHOD(CopyMsgService) (THIS_ LPMAPIUID lpUID,LPTSTR lpszDisplayName,LPCIID lpInterfaceToCopy,LPCIID lpInterfaceDst,LPVOID lpObjectDst,ULONG_PTR ulUIParam,ULONG ulFlags) IPURE; MAPIMETHOD(RenameMsgService) (THIS_ LPMAPIUID lpUID,ULONG ulFlags,LPTSTR lpszDisplayName) IPURE; MAPIMETHOD(ConfigureMsgService) (THIS_ LPMAPIUID lpUID,ULONG_PTR ulUIParam,ULONG ulFlags,ULONG cValues,LPSPropValue lpProps) IPURE; MAPIMETHOD(OpenProfileSection) (THIS_ LPMAPIUID lpUID,LPCIID lpInterface,ULONG ulFlags,LPPROFSECT *lppProfSect) IPURE; MAPIMETHOD(MsgServiceTransportOrder) (THIS_ ULONG cUID,LPMAPIUID lpUIDList,ULONG ulFlags) IPURE; MAPIMETHOD(AdminProviders) (THIS_ LPMAPIUID lpUID,ULONG ulFlags,LPPROVIDERADMIN *lppProviderAdmin) IPURE; MAPIMETHOD(SetPrimaryIdentity) (THIS_ LPMAPIUID lpUID,ULONG ulFlags) IPURE; MAPIMETHOD(GetProviderTable) (THIS_ ULONG ulFlags,LPMAPITABLE *lppTable) IPURE;
139
140#undef INTERFACE
141#define INTERFACE IMsgServiceAdmin
142 DECLARE_MAPI_INTERFACE_(IMsgServiceAdmin,IUnknown) {
143 BEGIN_INTERFACE
144 MAPI_IUNKNOWN_METHODS(PURE)
145 MAPI_IMSGSERVICEADMIN_METHODS(PURE)
146 };
147
148#ifdef __cplusplus
149}
150#endif
151#endif
Note: See TracBrowser for help on using the repository browser.