include: Add MAPISendMailW definition and structures.
[wine/multimedia.git] / include / mapi.h
blob1bd69e7378028ab6752152989dd52cba2be15015
1 /*
2 * Copyright (C) 2000 Francois Gouget
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.
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.
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
19 #ifndef MAPI_H
20 #define MAPI_H
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
26 /* Some types */
28 #ifndef __LHANDLE
29 #define __LHANDLE
30 typedef ULONG_PTR LHANDLE, *LPLHANDLE;
31 #endif
32 #define lhSessionNull ((LHANDLE)0)
34 #ifndef WINE_FLAGS_DEFINED
35 #define WINE_FLAGS_DEFINED
36 typedef ULONG FLAGS;
37 #endif
38 typedef ULONG *LPULONG;
40 typedef struct
42 ULONG ulReserved;
43 ULONG flFlags;
44 ULONG nPosition;
45 LPSTR lpszPathName;
46 LPSTR lpszFileName;
47 LPVOID lpFileType;
48 } MapiFileDesc, *lpMapiFileDesc;
50 typedef struct
52 ULONG ulReserved;
53 ULONG flFlags;
54 ULONG nPosition;
55 PWSTR lpszPathName;
56 PWSTR lpszFileName;
57 PVOID lpFileType;
58 } MapiFileDescW, *lpMapiFileDescW;
60 #ifndef MAPI_ORIG
61 #define MAPI_ORIG 0
62 #define MAPI_TO 1
63 #define MAPI_CC 2
64 #define MAPI_BCC 3
65 #endif
67 typedef struct
69 ULONG ulReserved;
70 ULONG ulRecipClass;
71 LPSTR lpszName;
72 LPSTR lpszAddress;
73 ULONG ulEIDSize;
74 LPVOID lpEntryID;
75 } MapiRecipDesc, *lpMapiRecipDesc;
77 typedef struct
79 ULONG ulReserved;
80 ULONG ulRecipClass;
81 PWSTR lpszName;
82 PWSTR lpszAddress;
83 ULONG ulEIDSize;
84 PVOID lpEntryID;
85 } MapiRecipDescW, *lpMapiRecipDescW;
87 typedef struct
89 ULONG ulReserved;
90 LPSTR lpszSubject;
91 LPSTR lpszNoteText;
92 LPSTR lpszMessageType;
93 LPSTR lpszDateReceived;
94 LPSTR lpszConversationID;
95 FLAGS flFlags;
96 lpMapiRecipDesc lpOriginator;
97 ULONG nRecipCount;
98 lpMapiRecipDesc lpRecips;
99 ULONG nFileCount;
100 lpMapiFileDesc lpFiles;
101 } MapiMessage, *lpMapiMessage;
103 typedef struct
105 ULONG ulReserved;
106 PWSTR lpszSubject;
107 PWSTR lpszNoteText;
108 PWSTR lpszMessageType;
109 PWSTR lpszDateReceived;
110 PWSTR lpszConversationID;
111 FLAGS flFlags;
112 lpMapiRecipDescW lpOriginator;
113 ULONG nRecipCount;
114 lpMapiRecipDescW lpRecips;
115 ULONG nFileCount;
116 lpMapiFileDescW lpFiles;
117 } MapiMessageW, *lpMapiMessageW;
119 /* Error codes */
121 #ifndef SUCCESS_SUCCESS
122 #define SUCCESS_SUCCESS 0
123 #endif
125 #define MAPI_USER_ABORT 1
126 #define MAPI_E_USER_ABORT MAPI_USER_ABORT
127 #define MAPI_E_FAILURE 2
128 #define MAPI_E_LOGON_FAILURE 3
129 #define MAPI_E_LOGIN_FAILURE MAPI_E_LOGON_FAILURE
130 #define MAPI_E_DISK_FULL 4
131 #define MAPI_E_INSUFFICIENT_MEMORY 5
132 #define MAPI_E_ACCESS_DENIED 6
133 #define MAPI_E_TOO_MANY_SESSIONS 8
134 #define MAPI_E_TOO_MANY_FILES 9
135 #define MAPI_E_TOO_MANY_RECIPIENTS 10
136 #define MAPI_E_ATTACHMENT_NOT_FOUND 11
137 #define MAPI_E_ATTACHMENT_OPEN_FAILURE 12
138 #define MAPI_E_ATTACHMENT_WRITE_FAILURE 13
139 #define MAPI_E_UNKNOWN_RECIPIENT 14
140 #define MAPI_E_BAD_RECIPTYPE 15
141 #define MAPI_E_NO_MESSAGES 16
142 #define MAPI_E_INVALID_MESSAGE 17
143 #define MAPI_E_TEXT_TOO_LARGE 18
144 #define MAPI_E_INVALID_SESSION 19
145 #define MAPI_E_TYPE_NOT_SUPPORTED 20
146 #define MAPI_E_AMBIGUOUS_RECIPIENT 21
147 #define MAPI_E_AMBIG_RECIP MAPI_E_AMBIGUOUS_RECIPIENT
148 #define MAPI_E_MESSAGE_IN_USE 22
149 #define MAPI_E_NETWORK_FAILURE 23
150 #define MAPI_E_INVALID_EDITFIELDS 24
151 #define MAPI_E_INVALID_RECIPS 25
152 #define MAPI_E_NOT_SUPPORTED 26
155 /* MAPILogon */
157 #ifndef MAPI_LOGON_UI
158 #define MAPI_LOGON_UI 0x00000001
159 #endif
160 #ifndef MAPI_NEW_SESSION
161 #define MAPI_NEW_SESSION 0x00000002
162 #endif
163 #ifndef MAPI_EXTENDED
164 #define MAPI_EXTENDED 0x00000020
165 #endif
166 #ifndef MAPI_FORCE_DOWNLOAD
167 #define MAPI_FORCE_DOWNLOAD 0x00001000
168 #endif
169 #ifndef MAPI_PASSWORD_UI
170 #define MAPI_PASSWORD_UI 0x00020000
171 #endif
174 /* MAPISendMail */
176 #define MAPI_DIALOG 0x00000008
178 /* MAPISendMailW */
180 #define MAPI_FORCE_UNICODE 0x00040000
183 /* API typedefs and prototypes */
185 typedef ULONG (WINAPI MAPIADDRESS)(LHANDLE,ULONG_PTR,LPSTR,ULONG,LPSTR,ULONG,lpMapiRecipDesc,FLAGS,ULONG,LPULONG,lpMapiRecipDesc*);
186 typedef MAPIADDRESS *LPMAPIADDRESS;
187 MAPIADDRESS MAPIAddress;
189 typedef ULONG (WINAPI MAPIDELETEMAIL)(LHANDLE,ULONG_PTR,LPSTR,FLAGS,ULONG);
190 typedef MAPIDELETEMAIL *LPMAPIDELETEMAIL;
191 MAPIDELETEMAIL MAPIDeleteMail;
193 typedef ULONG (WINAPI MAPIDETAILS)(LHANDLE,ULONG_PTR,lpMapiRecipDesc,FLAGS,ULONG);
194 typedef MAPIDETAILS *LPMAPIDETAILS;
195 MAPIDETAILS MAPIDetails;
197 typedef ULONG (WINAPI MAPIFINDNEXT)(LHANDLE,ULONG_PTR,LPSTR,LPSTR,FLAGS,ULONG,LPSTR);
198 typedef MAPIFINDNEXT *LPMAPIFINDNEXT;
199 MAPIFINDNEXT MAPIFindNext;
201 #ifndef MAPIFREEBUFFER_DEFINED
202 #define MAPIFREEBUFFER_DEFINED
203 typedef ULONG (WINAPI MAPIFREEBUFFER)(LPVOID);
204 typedef MAPIFREEBUFFER *LPMAPIFREEBUFFER;
205 MAPIFREEBUFFER MAPIFreeBuffer;
206 #endif
208 typedef ULONG (WINAPI MAPILOGOFF)(LHANDLE,ULONG_PTR,FLAGS,ULONG);
209 typedef MAPILOGOFF *LPMAPILOGOFF;
210 MAPILOGOFF MAPILogoff;
212 typedef ULONG (WINAPI MAPILOGON)(ULONG_PTR,LPSTR,LPSTR,FLAGS,ULONG,LPLHANDLE);
213 typedef MAPILOGON *LPMAPILOGON;
214 MAPILOGON MAPILogon;
216 typedef ULONG (WINAPI MAPIREADMAIL)(LHANDLE,ULONG_PTR,LPSTR,FLAGS,ULONG,lpMapiMessage);
217 typedef MAPIREADMAIL *LPMAPIREADMAIL;
218 MAPIREADMAIL MAPIReadMail;
220 typedef ULONG (WINAPI MAPIRESOLVENAME)(LHANDLE,ULONG_PTR,LPSTR,FLAGS,ULONG,lpMapiRecipDesc*);
221 typedef MAPIRESOLVENAME *LPMAPIRESOLVENAME;
222 MAPIRESOLVENAME MAPIResolveName;
224 typedef ULONG (WINAPI MAPISAVEMAIL)(LHANDLE,ULONG_PTR,lpMapiMessage,FLAGS,ULONG,LPSTR);
225 typedef MAPISAVEMAIL *LPMAPISAVEMAIL;
226 MAPISAVEMAIL MAPISaveMail;
228 typedef ULONG (WINAPI MAPISENDDOCUMENTS)(ULONG_PTR,LPSTR,LPSTR,LPSTR,ULONG);
229 typedef MAPISENDDOCUMENTS *LPMAPISENDDOCUMENTS;
230 MAPISENDDOCUMENTS MAPISendDocuments;
232 typedef ULONG (WINAPI MAPISENDMAIL)(LHANDLE,ULONG_PTR,lpMapiMessage,FLAGS,ULONG);
233 typedef MAPISENDMAIL *LPMAPISENDMAIL;
234 MAPISENDMAIL MAPISendMail;
236 typedef ULONG (WINAPI MAPISENDMAILW)(LHANDLE,ULONG_PTR,lpMapiMessageW,FLAGS,ULONG);
237 typedef MAPISENDMAILW *LPMAPISENDMAILW;
238 MAPISENDMAILW MAPISendMailW;
240 #ifdef __cplusplus
242 #endif
244 #endif /* MAPI_H */