87{
89 char *subjectA =
NULL, *bodyA =
NULL;
93 IMAPITable* msg_table;
95 IMsgStore* msg_store;
104
105 TRACE(
"Using Extended MAPI wrapper for MAPISendMail\n");
106
107
108
111
113 {
116 }
117
118
119
121 {
122
124
125
127 {
128 while (1)
129 {
131 {
134 }
135 else if (rows->
cRows != 1)
136 {
139 }
140 else
141 {
142
144 {
146 continue;
147 }
148 }
149
150 break;
151 }
152 }
153
155 }
156
157
158 if (!rows)
159 goto logoff;
160
161
165
166
168
169
172
174 unicode_aware =
TRUE;
175 else
176 {
177
179 {
180 WARN(
"No Unicode-capable mail client, and MAPI_FORCE_UNICODE is specified. MAPISendMail failed.\n");
183 goto logoff;
184 }
185 }
186
187
189 {
192 }
193
195
196
198 {
199 TRACE(
"Unable to open Drafts folder; opening Outbox instead\n");
202 }
203
205 goto logoff;
206
209
210
212 {
215
216
219
221
223 p.Value.bin.cb =
props[0].Value.bin.cb;
224 p.Value.bin.lpb =
props[0].Value.bin.lpb;
226
227
229 {
230 if (unicode_aware)
231 {
233 p.Value.lpszW =
message->lpszSubject;
234 }
235 else
236 {
238
240 p.Value.lpszA = subjectA;
241 }
242
244 }
245
246
248 {
250
253 {
254 if (unicode_aware)
256 else
257 {
260 }
261
263 }
264 }
265
266
268 {
269 ULONG num_attach = 0;
271
273 {
279
280 if (!
message->lpFiles[
i].lpszPathName)
281 continue;
282
283
286
288 continue;
289
290
292
294 {
296
298
300 {
301 if (
message->lpFiles[
i].lpszPathName[
i] ==
'\\' ||
302 message->lpFiles[
i].lpszPathName[
i] ==
'/')
303 {
305 break;
306 }
307 }
308 }
309
312
313
315 {
316 TRACE(
"Unable to create attachment\n");
318 continue;
319 }
320
321
323
326
327 if (unicode_aware)
328 {
333 }
334 else
335 {
337
342
343 }
344
347
349 {
351
354 {
357
359 {
362 }
363
364 TRACE(
"%d bytes written of attachment\n",
size);
365
366 IStream_Commit(
stream, STGC_DEFAULT);
368
372
374 num_attach++;
375 }
376 }
377
380
382 }
383 }
384
386
387
388
390 {
393
394
395
397 {
400 }
401
403
405 {
406 message_flags =
props->Value.ul;
408 }
409
411
413 {
416 }
417
419
421 {
422
423
427
429 {
432 break;
433
436 break;
437
438 default:
439 TRACE(
"ShowForm failure: %x\n",
ret);
440 break;
441 }
442 }
443 }
444
446 }
447
448
452
455
456logoff: ;
459
463}
ACPI_SIZE strlen(const char *String)
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
#define FILE_ATTRIBUTE_NORMAL
static void cleanup(void)
VOID WINAPI FreeProws(LPSRowSet lpRowSet)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLboolean GLenum GLenum GLvoid * values
GLuint GLint GLboolean GLint GLenum access
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define MAPI_E_USER_ABORT
#define MAPI_E_LOGIN_FAILURE
MAPIFREEBUFFER MAPIFreeBuffer
#define MAPI_E_USER_CANCEL
#define IMsgStore_OpenEntry(p, a, b, c, d, e, f)
#define IMessage_CreateAttach(p, a, b, c, d)
#define IMAPIFolder_Release(p)
#define IAttach_SetProps(p, a, b, c)
#define IAttach_OpenProperty(p, a, b, c, d, e)
#define IMAPITable_SetColumns(p, a, b)
#define SizedSPropTagArray(n, id)
#define IAttach_SaveChanges(p, a)
#define IMessage_OpenProperty(p, a, b, c, d, e)
#define IMsgStore_Release(p)
#define IMessage_SaveChanges(p, a)
#define IMsgStore_GetReceiveFolder(p, a, b, c, d, e)
#define IAttach_Release(p)
#define IMessage_SetProps(p, a, b, c)
#define IMAPITable_QueryRows(p, a, b, c)
#define IMAPIFolder_CreateMessage(p, a, b, c)
#define IMAPITable_Release(p)
#define KEEP_OPEN_READONLY
#define IMessage_GetProps(p, a, b, c, d)
#define IMAPIFolder_GetProps(p, a, b, c, d)
#define IMessage_Release(p)
#define IMsgStore_GetProps(p, a, b, c, d)
#define KEEP_OPEN_READWRITE
#define IMAPISession_Logoff(p, a, b, c)
#define IMAPISession_GetMsgStoresTable(p, a, b)
#define IMAPISession_Release(p)
MAPIUNINITIALIZE MAPIUninitialize
#define IMAPISession_PrepareForm(p, a, b, c)
#define IMAPISession_OpenMsgStore(p, a, b, c, d, e, f)
#define IMAPISession_ShowForm(p, a, b, c, d, e, f, g, h, i, j, k)
static CHAR filenameA[MAX_PATH]
interface IStream * LPSTREAM
static const WCHAR props[]
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value