Owen Rudge : mapi32: Pass through MAPISendMail if Simple MAPI provider loaded.

Alexandre Julliard julliard at winehq.org
Fri Sep 18 13:37:41 CDT 2009


Module: wine
Branch: master
Commit: 2e90bd6695ca11d967cf680c6930a0975156a724
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2e90bd6695ca11d967cf680c6930a0975156a724

Author: Owen Rudge <orudge at codeweavers.com>
Date:   Fri Sep 18 15:15:49 2009 +0100

mapi32: Pass through MAPISendMail if Simple MAPI provider loaded.

---

 dlls/mapi32/sendmail.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/dlls/mapi32/sendmail.c b/dlls/mapi32/sendmail.c
index 7b8de66..7cf8ec8 100644
--- a/dlls/mapi32/sendmail.c
+++ b/dlls/mapi32/sendmail.c
@@ -2,6 +2,7 @@
  * MAPISendMail implementation
  *
  * Copyright 2005 Hans Leidekker
+ * Copyright 2009 Owen Rudge for CodeWeavers
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -33,6 +34,7 @@
 #include "shellapi.h"
 #include "shlwapi.h"
 #include "wine/debug.h"
+#include "util.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(mapi);
 
@@ -53,7 +55,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mapi);
  *  Failure: MAPI_E_FAILURE
  *
  * NOTES
- *  This is a temporary hack. 
+ *  The fallback procedure is a temporary hack.
  */
 ULONG WINAPI MAPISendMail( LHANDLE session, ULONG_PTR uiparam,
     lpMapiMessage message, FLAGS flags, ULONG reserved )
@@ -74,6 +76,14 @@ ULONG WINAPI MAPISendMail( LHANDLE session, ULONG_PTR uiparam,
     TRACE( "(0x%08x 0x%08lx %p 0x%08x 0x%08x)\n", session, uiparam,
            message, flags, reserved );
 
+    /* Check to see if we have a Simple MAPI provider loaded */
+    if (mapiFunctions.MAPISendMail)
+        return mapiFunctions.MAPISendMail(session, uiparam, message, flags, reserved);
+
+    /* TODO: Check if we have an Extended MAPI provider, if so, implement
+             wrapper around that. */
+
+    /* Fall back on our own implementation */
     if (!message) return MAPI_E_FAILURE;
 
     for (i = 0; i < message->nRecipCount; i++)




More information about the wine-cvs mailing list