https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9d3a9694f436ea650135e2710da881d561b0ea7e

commit 9d3a9694f436ea650135e2710da881d561b0ea7e
Author:     Amine Khaldi <[email protected]>
AuthorDate: Sat Nov 9 21:50:53 2019 +0100
Commit:     Amine Khaldi <[email protected]>
CommitDate: Sat Nov 9 21:50:53 2019 +0100

    [MAPI32] Sync with Wine Staging 4.18. CORE-16441
---
 dll/win32/mapi32/precomp.h  |  4 +---
 dll/win32/mapi32/prop.c     | 19 +++++++++----------
 dll/win32/mapi32/sendmail.c |  2 --
 dll/win32/mapi32/util.c     |  9 ++++-----
 media/doc/README.WINE       |  2 +-
 5 files changed, 15 insertions(+), 21 deletions(-)

diff --git a/dll/win32/mapi32/precomp.h b/dll/win32/mapi32/precomp.h
index 36a4771cbb2..d85166d9a1d 100644
--- a/dll/win32/mapi32/precomp.h
+++ b/dll/win32/mapi32/precomp.h
@@ -2,8 +2,6 @@
 #ifndef _MAPI32_PCH_
 #define _MAPI32_PCH_
 
-#include <wine/config.h>
-
 #include <stdarg.h>
 
 #define WIN32_NO_STATUS
@@ -17,12 +15,12 @@
 #include <windef.h>
 #include <winbase.h>
 #include <winreg.h>
+#include <winnls.h>
 #include <mapi.h>
 #include <mapival.h>
 #include <shlwapi.h>
 
 #include <wine/debug.h>
-#include <wine/unicode.h>
 
 #include "util.h"
 
diff --git a/dll/win32/mapi32/prop.c b/dll/win32/mapi32/prop.c
index 03df644f212..b217035e2c0 100644
--- a/dll/win32/mapi32/prop.c
+++ b/dll/win32/mapi32/prop.c
@@ -29,7 +29,6 @@
 #include "shlwapi.h"
 #include "wine/list.h"
 #include "wine/debug.h"
-#include "wine/unicode.h"
 #include "mapival.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(mapi);
@@ -91,7 +90,7 @@ SCODE WINAPI PropCopyMore(LPSPropValue lpDest, LPSPropValue 
lpSrc,
             memcpy(lpDest->Value.lpszA, lpSrc->Value.lpszA, ulLen);
         break;
     case PT_UNICODE:
-        ulLen = (strlenW(lpSrc->Value.lpszW) + 1u) * sizeof(WCHAR);
+        ulLen = (lstrlenW(lpSrc->Value.lpszW) + 1u) * sizeof(WCHAR);
         scode = lpMore(ulLen, lpOrig, (LPVOID*)&lpDest->Value.lpszW);
         if (SUCCEEDED(scode))
             memcpy(lpDest->Value.lpszW, lpSrc->Value.lpszW, ulLen);
@@ -156,7 +155,7 @@ SCODE WINAPI PropCopyMore(LPSPropValue lpDest, LPSPropValue 
lpSrc,
 
                 for (i = 0; i < lpSrc->Value.MVszW.cValues; i++)
                 {
-                    ULONG ulStrLen = strlenW(lpSrc->Value.MVszW.lppszW[i]) + 
1u;
+                    ULONG ulStrLen = lstrlenW(lpSrc->Value.MVszW.lppszW[i]) + 
1u;
 
                     lpDest->Value.MVszW.lppszW[i] = lpNextStr;
                     memcpy(lpNextStr, lpSrc->Value.MVszW.lppszW[i], ulStrLen * 
sizeof(WCHAR));
@@ -263,7 +262,7 @@ ULONG WINAPI UlPropSize(LPSPropValue lpProp)
                          break;
     case PT_MV_UNICODE:  ulRet = 0u;
                          for (i = 0; i < lpProp->Value.MVszW.cValues; i++)
-                             ulRet += (strlenW(lpProp->Value.MVszW.lppszW[i]) 
+ 1u);
+                             ulRet += (lstrlenW(lpProp->Value.MVszW.lppszW[i]) 
+ 1u);
                          ulRet *= sizeof(WCHAR);
                          break;
     case PT_UNICODE:     ulRet = (lstrlenW(lpProp->Value.lpszW) + 1u) * 
sizeof(WCHAR);
@@ -504,7 +503,7 @@ LONG WINAPI LPropCompareProp(LPSPropValue lpPropLeft, 
LPSPropValue lpPropRight)
     case PT_STRING8:
         return lstrcmpA(lpPropLeft->Value.lpszA, lpPropRight->Value.lpszA);
     case PT_UNICODE:
-        return strcmpW(lpPropLeft->Value.lpszW, lpPropRight->Value.lpszW);
+        return lstrcmpW(lpPropLeft->Value.lpszW, lpPropRight->Value.lpszW);
     case PT_ERROR:
         if (lpPropLeft->Value.err > lpPropRight->Value.err)
             return 1;
@@ -828,7 +827,7 @@ SCODE WINAPI ScCopyProps(int cValues, LPSPropValue lpProps, 
LPVOID lpDst, ULONG
             lpDataDest += ulLen;
             break;
         case PT_UNICODE:
-            ulLen = (strlenW(lpProps->Value.lpszW) + 1u) * sizeof(WCHAR);
+            ulLen = (lstrlenW(lpProps->Value.lpszW) + 1u) * sizeof(WCHAR);
             lpDest->Value.lpszW = (LPWSTR)lpDataDest;
             memcpy(lpDest->Value.lpszW, lpProps->Value.lpszW, ulLen);
             lpDataDest += ulLen;
@@ -867,7 +866,7 @@ SCODE WINAPI ScCopyProps(int cValues, LPSPropValue lpProps, 
LPVOID lpDst, ULONG
 
                     for (i = 0; i < lpProps->Value.MVszW.cValues; i++)
                     {
-                        ULONG ulStrLen = 
(strlenW(lpProps->Value.MVszW.lppszW[i]) + 1u) * sizeof(WCHAR);
+                        ULONG ulStrLen = 
(lstrlenW(lpProps->Value.MVszW.lppszW[i]) + 1u) * sizeof(WCHAR);
 
                         lpDest->Value.MVszW.lppszW[i] = (LPWSTR)lpDataDest;
                         memcpy(lpDataDest, lpProps->Value.MVszW.lppszW[i], 
ulStrLen);
@@ -981,7 +980,7 @@ SCODE WINAPI ScRelocProps(int cValues, LPSPropValue 
lpProps, LPVOID lpOld,
             ulLen = bBadPtr ? 0 : (lstrlenW(lpDest->Value.lpszW) + 1u) * 
sizeof(WCHAR);
             lpDest->Value.lpszW = (LPWSTR)RELOC_PTR(lpDest->Value.lpszW);
             if (bBadPtr)
-                ulLen = (strlenW(lpDest->Value.lpszW) + 1u) * sizeof(WCHAR);
+                ulLen = (lstrlenW(lpDest->Value.lpszW) + 1u) * sizeof(WCHAR);
             ulCount += ulLen;
             break;
         case PT_BINARY:
@@ -1020,11 +1019,11 @@ SCODE WINAPI ScRelocProps(int cValues, LPSPropValue 
lpProps, LPVOID lpOld,
 
                     for (i = 0; i < lpDest->Value.MVszW.cValues; i++)
                     {
-                        ULONG ulStrLen = bBadPtr ? 0 : 
(strlenW(lpDest->Value.MVszW.lppszW[i]) + 1u) * sizeof(WCHAR);
+                        ULONG ulStrLen = bBadPtr ? 0 : 
(lstrlenW(lpDest->Value.MVszW.lppszW[i]) + 1u) * sizeof(WCHAR);
 
                         lpDest->Value.MVszW.lppszW[i] = 
(LPWSTR)RELOC_PTR(lpDest->Value.MVszW.lppszW[i]);
                         if (bBadPtr)
-                            ulStrLen = (strlenW(lpDest->Value.MVszW.lppszW[i]) 
+ 1u) * sizeof(WCHAR);
+                            ulStrLen = 
(lstrlenW(lpDest->Value.MVszW.lppszW[i]) + 1u) * sizeof(WCHAR);
                         ulCount += ulStrLen;
                     }
                     break;
diff --git a/dll/win32/mapi32/sendmail.c b/dll/win32/mapi32/sendmail.c
index 407dd130411..e1b7a682088 100644
--- a/dll/win32/mapi32/sendmail.c
+++ b/dll/win32/mapi32/sendmail.c
@@ -19,8 +19,6 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "config.h"
-#include "wine/port.h"
 
 #include <stdio.h>
 #include <stdarg.h>
diff --git a/dll/win32/mapi32/util.c b/dll/win32/mapi32/util.c
index 9c3b01944a5..7e324a0e650 100644
--- a/dll/win32/mapi32/util.c
+++ b/dll/win32/mapi32/util.c
@@ -33,7 +33,6 @@
 #include "objbase.h"
 #include "shlwapi.h"
 #include "wine/debug.h"
-#include "wine/unicode.h"
 #include "mapival.h"
 #include "xcmc.h"
 #include "msi.h"
@@ -404,7 +403,7 @@ VOID WINAPI SwapPword(PUSHORT lpData, ULONG ulLen)
 ULONG WINAPI MNLS_lstrlenW(LPCWSTR lpszStr)
 {
     TRACE("(%s)\n", debugstr_w(lpszStr));
-    return strlenW(lpszStr);
+    return lstrlenW(lpszStr);
 }
 
 /*************************************************************************
@@ -423,7 +422,7 @@ ULONG WINAPI MNLS_lstrlenW(LPCWSTR lpszStr)
 INT WINAPI MNLS_lstrcmpW(LPCWSTR lpszLeft, LPCWSTR lpszRight)
 {
     TRACE("(%s,%s)\n", debugstr_w(lpszLeft), debugstr_w(lpszRight));
-    return strcmpW(lpszLeft, lpszRight);
+    return lstrcmpW(lpszLeft, lpszRight);
 }
 
 /*************************************************************************
@@ -443,7 +442,7 @@ ULONG WINAPI MNLS_lstrcpyW(LPWSTR lpszDest, LPCWSTR lpszSrc)
     ULONG len;
 
     TRACE("(%p,%s)\n", lpszDest, debugstr_w(lpszSrc));
-    len = (strlenW(lpszSrc) + 1) * sizeof(WCHAR);
+    len = (lstrlenW(lpszSrc) + 1) * sizeof(WCHAR);
     memcpy(lpszDest, lpszSrc, len);
     return len;
 }
@@ -494,7 +493,7 @@ BOOL WINAPI FEqualNames(LPMAPINAMEID lpName1, LPMAPINAMEID 
lpName2)
         return FALSE;
 
     if (lpName1->ulKind == MNID_STRING)
-        return !strcmpW(lpName1->Kind.lpwstrName, lpName2->Kind.lpwstrName);
+        return !lstrcmpW(lpName1->Kind.lpwstrName, lpName2->Kind.lpwstrName);
 
     return lpName1->Kind.lID == lpName2->Kind.lID;
 }
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index 6d6bb88064a..5b085abfe38 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -90,7 +90,7 @@ dll/win32/jscript             # Synced to WineStaging-4.18
 dll/win32/jsproxy             # Synced to WineStaging-4.18
 dll/win32/loadperf            # Synced to WineStaging-4.18
 dll/win32/lz32                # Synced to WineStaging-3.3
-dll/win32/mapi32              # Synced to WineStaging-4.0
+dll/win32/mapi32              # Synced to WineStaging-4.18
 dll/win32/mciavi32            # Synced to WineStaging-3.3
 dll/win32/mcicda              # Synced to WineStaging-3.3
 dll/win32/mciqtz32            # Synced to WineStaging-3.3

Reply via email to