source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/mapiform.h@ 1181

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

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

File size: 12.5 KB
RevLine 
[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 MAPIFORM_H
7#define MAPIFORM_H
8
9#include <mapidefs.h>
10#include <mapicode.h>
11#include <mapiguid.h>
12#include <mapitags.h>
13
14#ifndef BEGIN_INTERFACE
15#define BEGIN_INTERFACE
16#endif
17
18typedef const RECT *LPCRECT;
19typedef ULONG HFRMREG;
20
21#define HFRMREG_DEFAULT 0
22#define HFRMREG_LOCAL 1
23#define HFRMREG_PERSONAL 2
24#define HFRMREG_FOLDER 3
25
26DECLARE_MAPI_INTERFACE_PTR(IPersistMessage,LPPERSISTMESSAGE);
27DECLARE_MAPI_INTERFACE_PTR(IMAPIMessageSite,LPMAPIMESSAGESITE);
28DECLARE_MAPI_INTERFACE_PTR(IMAPISession,LPMAPISESSION);
29DECLARE_MAPI_INTERFACE_PTR(IMAPIViewContext,LPMAPIVIEWCONTEXT);
30DECLARE_MAPI_INTERFACE_PTR(IMAPIViewAdviseSink,LPMAPIVIEWADVISESINK);
31DECLARE_MAPI_INTERFACE_PTR(IMAPIFormAdviseSink,LPMAPIFORMADVISESINK);
32DECLARE_MAPI_INTERFACE_PTR(IMAPIFormInfo,LPMAPIFORMINFO);
33DECLARE_MAPI_INTERFACE_PTR(IMAPIFormMgr,LPMAPIFORMMGR);
34DECLARE_MAPI_INTERFACE_PTR(IMAPIFormContainer,LPMAPIFORMCONTAINER);
35DECLARE_MAPI_INTERFACE_PTR(IMAPIForm,LPMAPIFORM);
36DECLARE_MAPI_INTERFACE_PTR(IMAPIFormFactory,LPMAPIFORMFACTORY);
37
38typedef const char **LPPCSTR;
39typedef LPMAPIFORMINFO *LPPMAPIFORMINFO;
40
41STDAPI MAPIOpenFormMgr(LPMAPISESSION pSession,LPMAPIFORMMGR *ppmgr);
42STDAPI MAPIOpenLocalFormContainer(LPMAPIFORMCONTAINER *ppfcnt);
43
44#define MAPI_GETLASTERROR_METHOD(IPURE) MAPIMETHOD(GetLastError) (THIS_ HRESULT hResult,ULONG ulFlags,LPMAPIERROR *lppMAPIError) IPURE;
45#define MAPI_IPERSISTMESSAGE_METHODS(IPURE) MAPIMETHOD(GetClassID) (THIS_ LPCLSID lpClassID) IPURE; MAPIMETHOD(IsDirty)(THIS) IPURE; MAPIMETHOD(InitNew)(THIS_ LPMAPIMESSAGESITE pMessageSite,LPMESSAGE pMessage) IPURE; MAPIMETHOD(Load)(THIS_ LPMAPIMESSAGESITE pMessageSite,LPMESSAGE pMessage,ULONG ulMessageStatus,ULONG ulMessageFlags) IPURE; MAPIMETHOD(Save)(THIS_ LPMESSAGE pMessage,ULONG fSameAsLoad) IPURE; MAPIMETHOD(SaveCompleted)(THIS_ LPMESSAGE pMessage) IPURE; MAPIMETHOD(HandsOffMessage)(THIS) IPURE;
46#undef INTERFACE
47#define INTERFACE IPersistMessage
48DECLARE_MAPI_INTERFACE_(IPersistMessage,IUnknown) {
49 BEGIN_INTERFACE
50 MAPI_IUNKNOWN_METHODS(PURE)
51 MAPI_GETLASTERROR_METHOD(PURE)
52 MAPI_IPERSISTMESSAGE_METHODS(PURE)
53};
54
55#define MAPI_IMAPIMESSAGESITE_METHODS(IPURE) MAPIMETHOD(GetSession) (THIS_ LPMAPISESSION *ppSession) IPURE; MAPIMETHOD(GetStore) (THIS_ LPMDB *ppStore) IPURE; MAPIMETHOD(GetFolder) (THIS_ LPMAPIFOLDER *ppFolder) IPURE; MAPIMETHOD(GetMessage) (THIS_ LPMESSAGE *ppmsg) IPURE; MAPIMETHOD(GetFormManager) (THIS_ LPMAPIFORMMGR *ppFormMgr) IPURE; MAPIMETHOD(NewMessage) (THIS_ ULONG fComposeInFolder,LPMAPIFOLDER pFolderFocus,LPPERSISTMESSAGE pPersistMessage,LPMESSAGE *ppMessage,LPMAPIMESSAGESITE *ppMessageSite,LPMAPIVIEWCONTEXT *ppViewContext) IPURE; MAPIMETHOD(CopyMessage) (THIS_ LPMAPIFOLDER pFolderDestination) IPURE; MAPIMETHOD(MoveMessage) (THIS_ LPMAPIFOLDER pFolderDestination,LPMAPIVIEWCONTEXT pViewContext,LPCRECT prcPosRect) IPURE; MAPIMETHOD(DeleteMessage) (THIS_ LPMAPIVIEWCONTEXT pViewContext,LPCRECT prcPosRect) IPURE; MAPIMETHOD(SaveMessage) (THIS) IPURE; MAPIMETHOD(SubmitMessage) (THIS_ ULONG ulFlags) IPURE; MAPIMETHOD(GetSiteStatus) (THIS_ LPULONG lpulStatus) IPURE;
56#undef INTERFACE
57#define INTERFACE IMAPIMessageSite
58DECLARE_MAPI_INTERFACE_(IMAPIMessageSite,IUnknown) {
59 BEGIN_INTERFACE
60 MAPI_IUNKNOWN_METHODS(PURE)
61 MAPI_GETLASTERROR_METHOD(PURE)
62 MAPI_IMAPIMESSAGESITE_METHODS(PURE)
63};
64
65#define MAPI_IMAPIFORM_METHODS(IPURE) MAPIMETHOD(SetViewContext) (THIS_ LPMAPIVIEWCONTEXT pViewContext) IPURE; MAPIMETHOD(GetViewContext) (THIS_ LPMAPIVIEWCONTEXT *ppViewContext) IPURE; MAPIMETHOD(ShutdownForm)(THIS_ ULONG ulSaveOptions) IPURE; MAPIMETHOD(DoVerb) (THIS_ LONG iVerb,LPMAPIVIEWCONTEXT lpViewContext,ULONG hwndParent,LPCRECT lprcPosRect) IPURE; MAPIMETHOD(Advise)(THIS_ LPMAPIVIEWADVISESINK pAdvise,ULONG *pdwStatus) IPURE; MAPIMETHOD(Unadvise) (THIS_ ULONG ulConnection) IPURE;
66#undef INTERFACE
67#define INTERFACE IMAPIForm
68DECLARE_MAPI_INTERFACE_(IMAPIForm,IUnknown) {
69 BEGIN_INTERFACE
70 MAPI_IUNKNOWN_METHODS(PURE)
71 MAPI_GETLASTERROR_METHOD(PURE)
72 MAPI_IMAPIFORM_METHODS(PURE)
73};
74
75typedef enum tagSAVEOPTS {
76 SAVEOPTS_SAVEIFDIRTY = 0,SAVEOPTS_NOSAVE = 1,SAVEOPTS_PROMPTSAVE = 2
77} SAVEOPTS;
78
79typedef struct {
80 ULONG ulFlags;
81 HGLOBAL hDevMode;
82 HGLOBAL hDevNames;
83 ULONG ulFirstPageNumber;
84 ULONG fPrintAttachments;
85} FORMPRINTSETUP,*LPFORMPRINTSETUP;
86
87#define SAVE_FORMAT_TEXT 1
88#define SAVE_FORMAT_RICHTEXT 2
89
90#define MAPI_IMAPIVIEWCONTEXT_METHODS(IPURE) MAPIMETHOD(SetAdviseSink)(THIS_ LPMAPIFORMADVISESINK pmvns) IPURE; MAPIMETHOD(ActivateNext)(THIS_ ULONG ulDir,LPCRECT prcPosRect) IPURE; MAPIMETHOD(GetPrintSetup)(THIS_ ULONG ulFlags,LPFORMPRINTSETUP *lppFormPrintSetup) IPURE; MAPIMETHOD(GetSaveStream)(THIS_ ULONG *pulFlags,ULONG *pulFormat,LPSTREAM *ppstm) IPURE; MAPIMETHOD(GetViewStatus) (THIS_ LPULONG lpulStatus) IPURE;
91#undef INTERFACE
92#define INTERFACE IMAPIViewContext
93DECLARE_MAPI_INTERFACE_(IMAPIViewContext,IUnknown) {
94 BEGIN_INTERFACE
95 MAPI_IUNKNOWN_METHODS(PURE)
96 MAPI_GETLASTERROR_METHOD(PURE)
97 MAPI_IMAPIVIEWCONTEXT_METHODS(PURE)
98};
99
100#define VCSTATUS_NEXT 0x00000001
101#define VCSTATUS_PREV 0x00000002
102#define VCSTATUS_MODAL 0x00000004
103#define VCSTATUS_INTERACTIVE 0x00000008
104#define VCSTATUS_READONLY 0x00000010
105#define VCSTATUS_DELETE 0x00010000
106#define VCSTATUS_COPY 0x00020000
107#define VCSTATUS_MOVE 0x00040000
108#define VCSTATUS_SUBMIT 0x00080000
109#define VCSTATUS_DELETE_IS_MOVE 0x00100000
110#define VCSTATUS_SAVE 0x00200000
111#define VCSTATUS_NEW_MESSAGE 0x00400000
112
113#define VCDIR_NEXT VCSTATUS_NEXT
114#define VCDIR_PREV VCSTATUS_PREV
115#define VCDIR_DELETE VCSTATUS_DELETE
116#define VCDIR_MOVE VCSTATUS_MOVE
117
118#define MAPI_IMAPIFORMADVISESINK_METHODS(IPURE) STDMETHOD(OnChange)(THIS_ ULONG ulDir) IPURE; STDMETHOD(OnActivateNext)(THIS_ LPCSTR lpszMessageClass,ULONG ulMessageStatus,ULONG ulMessageFlags,LPPERSISTMESSAGE *ppPersistMessage) IPURE;
119#undef INTERFACE
120#define INTERFACE IMAPIFormAdviseSink
121DECLARE_MAPI_INTERFACE_(IMAPIFormAdviseSink,IUnknown) {
122 BEGIN_INTERFACE
123 MAPI_IUNKNOWN_METHODS(PURE)
124 MAPI_IMAPIFORMADVISESINK_METHODS(PURE)
125};
126
127#define MAPI_IMAPIVIEWADVISESINK_METHODS(IPURE) MAPIMETHOD(OnShutdown)(THIS) IPURE; MAPIMETHOD(OnNewMessage)(THIS) IPURE; MAPIMETHOD(OnPrint)(THIS_ ULONG dwPageNumber,HRESULT hrStatus) IPURE; MAPIMETHOD(OnSubmitted) (THIS) IPURE; MAPIMETHOD(OnSaved) (THIS) IPURE;
128#undef INTERFACE
129#define INTERFACE IMAPIViewAdviseSink
130DECLARE_MAPI_INTERFACE_(IMAPIViewAdviseSink,IUnknown) {
131 BEGIN_INTERFACE
132 MAPI_IUNKNOWN_METHODS(PURE)
133 MAPI_IMAPIVIEWADVISESINK_METHODS(PURE)
134};
135
136typedef struct {
137 LPTSTR pszDisplayName;
138 ULONG nVal;
139} SMAPIFormPropEnumVal,*LPMAPIFORMPROPENUMVAL;
140
141typedef ULONG FORMPROPSPECIALTYPE;
142
143#define FPST_VANILLA 0
144#define FPST_ENUM_PROP 1
145
146typedef struct {
147 ULONG ulFlags;
148 ULONG nPropType;
149 MAPINAMEID nmid;
150 LPTSTR pszDisplayName;
151 FORMPROPSPECIALTYPE nSpecialType;
152 union {
153 struct {
154 MAPINAMEID nmidIdx;
155 ULONG cfpevAvailable;
156 LPMAPIFORMPROPENUMVAL pfpevAvailable;
157 } s1;
158 } u;
159} SMAPIFormProp,*LPMAPIFORMPROP;
160
161typedef struct {
162 ULONG cProps;
163 ULONG ulPad;
164 SMAPIFormProp aFormProp[MAPI_DIM];
165} SMAPIFormPropArray,*LPMAPIFORMPROPARRAY;
166
167#define CbMAPIFormPropArray(_c) (offsetof(SMAPIFormPropArray,aFormProp) + (_c)*sizeof(SMAPIFormProp))
168
169typedef struct {
170 LONG lVerb;
171 LPTSTR szVerbname;
172 DWORD fuFlags;
173 DWORD grfAttribs;
174 ULONG ulFlags;
175} SMAPIVerb,*LPMAPIVERB;
176
177typedef struct {
178 ULONG cMAPIVerb;
179 SMAPIVerb aMAPIVerb[MAPI_DIM];
180} SMAPIVerbArray,*LPMAPIVERBARRAY;
181
182#define CbMAPIVerbArray(_c) (offsetof(SMAPIVerbArray,aMAPIVerb) + (_c)*sizeof(SMAPIVerb))
183
184#define MAPI_IMAPIFORMINFO_METHODS(IPURE) MAPIMETHOD(CalcFormPropSet)(THIS_ ULONG ulFlags,LPMAPIFORMPROPARRAY *ppFormPropArray) IPURE; MAPIMETHOD(CalcVerbSet)(THIS_ ULONG ulFlags,LPMAPIVERBARRAY *ppMAPIVerbArray) IPURE; MAPIMETHOD(MakeIconFromBinary)(THIS_ ULONG nPropID,HICON *phicon) IPURE; MAPIMETHOD(SaveForm)(THIS_ LPCTSTR szFileName) IPURE; MAPIMETHOD(OpenFormContainer)(THIS_ LPMAPIFORMCONTAINER *ppformcontainer) IPURE;
185#undef INTERFACE
186#define INTERFACE IMAPIFormInfo
187DECLARE_MAPI_INTERFACE_(IMAPIFormInfo,IMAPIProp) {
188 BEGIN_INTERFACE
189 MAPI_IUNKNOWN_METHODS(PURE)
190 MAPI_IMAPIPROP_METHODS(PURE)
191 MAPI_IMAPIFORMINFO_METHODS(PURE)
192};
193
194#define MAPI_MESSAGE_BEHAVIOR_IPM 0
195#define MAPI_MESSAGE_BEHAVIOR_FOLDER 1
196
197typedef struct {
198 ULONG cValues;
199 LPCSTR aMessageClass[MAPI_DIM];
200} SMessageClassArray,*LPSMESSAGECLASSARRAY;
201
202#define CbMessageClassArray(_c) (offsetof(SMessageClassArray,aMessageClass) + (_c)*sizeof(LPCSTR))
203
204typedef struct {
205 ULONG cForms;
206 LPMAPIFORMINFO aFormInfo[MAPI_DIM];
207} SMAPIFormInfoArray,*LPSMAPIFORMINFOARRAY;
208
209#define CbMAPIFormInfoArray(_c) (offsetof(SMAPIFormInfoArray,aFormInfo) + (_c)*sizeof(LPMAPIFORMINFO))
210
211#define MAPIFORM_SELECT_ALL_REGISTRIES 0
212#define MAPIFORM_SELECT_FOLDER_REGISTRY_ONLY 1
213#define MAPIFORM_SELECT_NON_FOLDER_REGISTRY_ONLY 2
214
215#define FORMPROPSET_UNION 0
216#define FORMPROPSET_INTERSECTION 1
217
218#define MAPIFORM_EXACTMATCH 0x0020
219
220#define MAPI_IMAPIFORMMGR_METHODS(IPURE) MAPIMETHOD(LoadForm)(THIS_ ULONG ulUIParam,ULONG ulFlags,LPCSTR lpszMessageClass,ULONG ulMessageStatus,ULONG ulMessageFlags,LPMAPIFOLDER pFolderFocus,LPMAPIMESSAGESITE pMessageSite,LPMESSAGE pmsg,LPMAPIVIEWCONTEXT pViewContext,REFIID riid,LPVOID *ppvObj) IPURE; MAPIMETHOD(ResolveMessageClass)(THIS_ LPCSTR szMsgClass,ULONG ulFlags,LPMAPIFOLDER pFolderFocus,LPMAPIFORMINFO *ppResult) IPURE; MAPIMETHOD(ResolveMultipleMessageClasses)(THIS_ LPSMESSAGECLASSARRAY pMsgClasses,ULONG ulFlags,LPMAPIFOLDER pFolderFocus,LPSMAPIFORMINFOARRAY *pfrminfoarray) IPURE; MAPIMETHOD(CalcFormPropSet)(THIS_ LPSMAPIFORMINFOARRAY pfrminfoarray,ULONG ulFlags,LPMAPIFORMPROPARRAY *ppResults) IPURE; MAPIMETHOD(CreateForm)(THIS_ ULONG ulUIParam,ULONG ulFlags,LPMAPIFORMINFO pfrminfoToActivate,REFIID refiidToAsk,LPVOID *ppvObj) IPURE; MAPIMETHOD(SelectForm)(THIS_ ULONG ulUIParam,ULONG ulFlags,LPCTSTR pszTitle,LPMAPIFOLDER pfld,LPMAPIFORMINFO *ppfrminfoReturned) IPURE; MAPIMETHOD(SelectMultipleForms)(THIS_ ULONG ulUIParam,ULONG ulFlags,LPCTSTR pszTitle,LPMAPIFOLDER pfld,LPSMAPIFORMINFOARRAY pfrminfoarray,LPSMAPIFORMINFOARRAY *ppfrminfoarray) IPURE; MAPIMETHOD(SelectFormContainer)(THIS_ ULONG ulUIParam,ULONG ulFlags,LPMAPIFORMCONTAINER *lppfcnt) IPURE; MAPIMETHOD(OpenFormContainer)(THIS_ HFRMREG hfrmreg,LPUNKNOWN lpunk,LPMAPIFORMCONTAINER *lppfcnt) IPURE; MAPIMETHOD(PrepareForm)(THIS_ ULONG ulUIParam,ULONG ulFlags,LPMAPIFORMINFO pfrminfo) IPURE; MAPIMETHOD(IsInConflict)(THIS_ ULONG ulMessageFlags,ULONG ulMessageStatus,LPCSTR szMessageClass,LPMAPIFOLDER pFolderFocus) IPURE;
221#undef INTERFACE
222#define INTERFACE IMAPIFormMgr
223DECLARE_MAPI_INTERFACE_(IMAPIFormMgr,IUnknown) {
224 BEGIN_INTERFACE
225 MAPI_IUNKNOWN_METHODS(PURE)
226 MAPI_GETLASTERROR_METHOD(PURE)
227 MAPI_IMAPIFORMMGR_METHODS(PURE)
228};
229
230#define MAPIFORM_CPU_X86 1
231#define MAPIFORM_CPU_MIP 2
232#define MAPIFORM_CPU_AXP 3
233#define MAPIFORM_CPU_PPC 4
234#define MAPIFORM_CPU_M68 5
235
236#define MAPIFORM_OS_WIN_31 1
237#define MAPIFORM_OS_WINNT_35 2
238#define MAPIFORM_OS_WIN_95 3
239#define MAPIFORM_OS_MAC_7x 4
240#define MAPIFORM_OS_WINNT_40 5
241
242#define MAPIFORM_PLATFORM(CPU,OS) ((ULONG) ((((ULONG) CPU) << 16) | OS))
243
244#define MAPIFORM_INSTALL_DIALOG MAPI_DIALOG
245#define MAPIFORM_INSTALL_OVERWRITEONCONFLICT 0x0010
246
247#define MAPI_IMAPIFORMCONTAINER_METHODS(IPURE) MAPIMETHOD(InstallForm)(THIS_ ULONG ulUIParam,ULONG ulFlags,LPCTSTR szCfgPathName) IPURE; MAPIMETHOD(RemoveForm)(THIS_ LPCSTR szMessageClass) IPURE; MAPIMETHOD(ResolveMessageClass) (THIS_ LPCSTR szMessageClass,ULONG ulFlags,LPMAPIFORMINFO *pforminfo) IPURE; MAPIMETHOD(ResolveMultipleMessageClasses) (THIS_ LPSMESSAGECLASSARRAY pMsgClassArray,ULONG ulFlags,LPSMAPIFORMINFOARRAY *ppfrminfoarray) IPURE; MAPIMETHOD(CalcFormPropSet)(THIS_ ULONG ulFlags,LPMAPIFORMPROPARRAY *ppResults) IPURE; MAPIMETHOD(GetDisplay)(THIS_ ULONG ulFlags,LPTSTR *pszDisplayName) IPURE;
248#undef INTERFACE
249#define INTERFACE IMAPIFormContainer
250DECLARE_MAPI_INTERFACE_(IMAPIFormContainer,IUnknown) {
251 BEGIN_INTERFACE
252 MAPI_IUNKNOWN_METHODS(PURE)
253 MAPI_GETLASTERROR_METHOD(PURE)
254 MAPI_IMAPIFORMCONTAINER_METHODS(PURE)
255};
256
257#define MAPI_IMAPIFORMFACTORY_METHODS(IPURE) MAPIMETHOD(CreateClassFactory) (THIS_ REFCLSID clsidForm,ULONG ulFlags,LPCLASSFACTORY *lppClassFactory) IPURE; MAPIMETHOD(LockServer) (THIS_ ULONG ulFlags,ULONG fLockServer) IPURE;
258#undef INTERFACE
259#define INTERFACE IMAPIFormFactory
260DECLARE_MAPI_INTERFACE_(IMAPIFormFactory,IUnknown) {
261 BEGIN_INTERFACE
262 MAPI_IUNKNOWN_METHODS(PURE)
263 MAPI_GETLASTERROR_METHOD(PURE)
264 MAPI_IMAPIFORMFACTORY_METHODS(PURE)
265};
266#endif
Note: See TracBrowser for help on using the repository browser.