[Wine-devel] Eter's patch is applied to winehq repo 01/31/11

builder на builder.office.etersoft.ru builder на builder.office.etersoft.ru
Пн Янв 31 21:20:20 MSK 2011


New Etersoft's patches since last build time:
commit f5b39cfc3cdf3d180b2d05ac0a2e6c407b3ca4ef
Author: Alexander Morozov <amorozov на etersoft.ru>

    winemapi: Address can contain "SMTP:".

commit e5dee7d9650c2a57cc536b13114c3869679207d1
Author: Alexander Morozov <amorozov на etersoft.ru>

    winemapi: Implement MAPIResolveName.

---

commit f5b39cfc3cdf3d180b2d05ac0a2e6c407b3ca4ef
Author: Alexander Morozov <amorozov на etersoft.ru>
Date:   Fri Jan 14 17:58:55 2011 +0300

    winemapi: Address can contain "SMTP:".

diff --git a/dlls/winemapi/sendmail.c b/dlls/winemapi/sendmail.c
index 44c1d00..e4629bb 100644
--- a/dlls/winemapi/sendmail.c
+++ b/dlls/winemapi/sendmail.c
@@ -66,6 +66,7 @@ ULONG WINAPI MAPISendMail(LHANDLE session, ULONG_PTR uiparam,
     const char *address, *subject, *body;
     static const char format[] =
         "mailto:\"%s\"?subject=\"%s\"&cc=\"%s\"&bcc=\"%s\"&body=\"%s\"";
+    static const char smtp[] = "smtp:";
     char *mailto = NULL, *escape = NULL;
     char empty_string[] = "";
     HRESULT res;
@@ -86,6 +87,8 @@ ULONG WINAPI MAPISendMail(LHANDLE session, ULONG_PTR uiparam,
         }
 
         address = message->lpRecips[i].lpszAddress;
+        if (!strncasecmp(address, smtp, sizeof(smtp) - 1))
+            address += sizeof(smtp) - 1;
 
         if (address)
         {
@@ -169,6 +172,8 @@ ULONG WINAPI MAPISendMail(LHANDLE session, ULONG_PTR uiparam,
     for (i = 0; i < message->nRecipCount; i++)
     {
         address = message->lpRecips[i].lpszAddress;
+        if (!strncasecmp(address, smtp, sizeof(smtp) - 1))
+            address += sizeof(smtp) - 1;
 
         if (address)
         {

commit e5dee7d9650c2a57cc536b13114c3869679207d1
Author: Alexander Morozov <amorozov на etersoft.ru>
Date:   Thu Jan 13 16:56:24 2011 +0300

    winemapi: Implement MAPIResolveName.

diff --git a/dlls/winemapi/Makefile.in b/dlls/winemapi/Makefile.in
index 0c1ff6e..0c9c8a6 100644
--- a/dlls/winemapi/Makefile.in
+++ b/dlls/winemapi/Makefile.in
@@ -1,5 +1,5 @@
 MODULE    = winemapi.dll
-IMPORTS   = shlwapi shell32
+IMPORTS   = shlwapi shell32 mapi32
 
 C_SRCS = \
 	main.c \
diff --git a/dlls/winemapi/main.c b/dlls/winemapi/main.c
index a954ab7..0627aa2 100644
--- a/dlls/winemapi/main.c
+++ b/dlls/winemapi/main.c
@@ -26,6 +26,7 @@
 #include "objbase.h"
 #include "mapidefs.h"
 #include "mapi.h"
+#include "mapix.h"
 #include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(winemapi);
@@ -99,8 +100,31 @@ ULONG WINAPI MAPIReadMail(LHANDLE session, ULONG_PTR uiparam, LPSTR msg_id,
 ULONG WINAPI MAPIResolveName(LHANDLE session, ULONG_PTR uiparam, LPSTR name,
     FLAGS flags, ULONG reserved, lpMapiRecipDesc *recip)
 {
-    FIXME("(stub)\n");
-    return MAPI_E_NOT_SUPPORTED;
+    static const char smtp[] = "SMTP:";
+
+    SCODE scode;
+    char *p;
+
+    TRACE("(0x%08lx 0x%08lx %s 0x%08x 0x%08x %p)\n", session, uiparam,
+          debugstr_a(name), flags, reserved, recip);
+
+    if (!name || !strlen(name))
+        return MAPI_E_FAILURE;
+
+    scode = MAPIAllocateBuffer(sizeof(**recip) + sizeof(smtp) + strlen(name),
+                               (LPVOID *)recip);
+    if (scode != S_OK)
+        return MAPI_E_INSUFFICIENT_MEMORY;
+
+    ZeroMemory(*recip, sizeof(**recip));
+    p = (char *)(*recip + 1);
+    strcpy(p, smtp);
+    strcpy(p + sizeof(smtp) - 1, name);
+
+    (*recip)->ulRecipClass = MAPI_TO;
+    (*recip)->lpszName = p + sizeof(smtp) - 1;
+    (*recip)->lpszAddress = p;
+    return SUCCESS_SUCCESS;
 }
 
 ULONG WINAPI MAPISaveMail(LHANDLE session, ULONG_PTR uiparam, lpMapiMessage msg,


Подробная информация о списке рассылки Wine-devel