Commit 70f552c6 authored by Alexandre Julliard's avatar Alexandre Julliard

mapi32: Build with msvcrt.

parent e62ef270
...@@ -2,6 +2,8 @@ MODULE = mapi32.dll ...@@ -2,6 +2,8 @@ MODULE = mapi32.dll
IMPORTLIB = mapi32 IMPORTLIB = mapi32
IMPORTS = uuid shlwapi shell32 user32 advapi32 IMPORTS = uuid shlwapi shell32 user32 advapi32
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \ C_SRCS = \
imalloc.c \ imalloc.c \
mapi32_main.c \ mapi32_main.c \
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include "shlwapi.h" #include "shlwapi.h"
#include "wine/list.h" #include "wine/list.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/unicode.h"
#include "mapival.h" #include "mapival.h"
WINE_DEFAULT_DEBUG_CHANNEL(mapi); WINE_DEFAULT_DEBUG_CHANNEL(mapi);
...@@ -91,7 +90,7 @@ SCODE WINAPI PropCopyMore(LPSPropValue lpDest, LPSPropValue lpSrc, ...@@ -91,7 +90,7 @@ SCODE WINAPI PropCopyMore(LPSPropValue lpDest, LPSPropValue lpSrc,
memcpy(lpDest->Value.lpszA, lpSrc->Value.lpszA, ulLen); memcpy(lpDest->Value.lpszA, lpSrc->Value.lpszA, ulLen);
break; break;
case PT_UNICODE: 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); scode = lpMore(ulLen, lpOrig, (LPVOID*)&lpDest->Value.lpszW);
if (SUCCEEDED(scode)) if (SUCCEEDED(scode))
memcpy(lpDest->Value.lpszW, lpSrc->Value.lpszW, ulLen); memcpy(lpDest->Value.lpszW, lpSrc->Value.lpszW, ulLen);
...@@ -156,7 +155,7 @@ SCODE WINAPI PropCopyMore(LPSPropValue lpDest, LPSPropValue lpSrc, ...@@ -156,7 +155,7 @@ SCODE WINAPI PropCopyMore(LPSPropValue lpDest, LPSPropValue lpSrc,
for (i = 0; i < lpSrc->Value.MVszW.cValues; i++) 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; lpDest->Value.MVszW.lppszW[i] = lpNextStr;
memcpy(lpNextStr, lpSrc->Value.MVszW.lppszW[i], ulStrLen * sizeof(WCHAR)); memcpy(lpNextStr, lpSrc->Value.MVszW.lppszW[i], ulStrLen * sizeof(WCHAR));
...@@ -263,7 +262,7 @@ ULONG WINAPI UlPropSize(LPSPropValue lpProp) ...@@ -263,7 +262,7 @@ ULONG WINAPI UlPropSize(LPSPropValue lpProp)
break; break;
case PT_MV_UNICODE: ulRet = 0u; case PT_MV_UNICODE: ulRet = 0u;
for (i = 0; i < lpProp->Value.MVszW.cValues; i++) 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); ulRet *= sizeof(WCHAR);
break; break;
case PT_UNICODE: ulRet = (lstrlenW(lpProp->Value.lpszW) + 1u) * sizeof(WCHAR); case PT_UNICODE: ulRet = (lstrlenW(lpProp->Value.lpszW) + 1u) * sizeof(WCHAR);
...@@ -504,7 +503,7 @@ LONG WINAPI LPropCompareProp(LPSPropValue lpPropLeft, LPSPropValue lpPropRight) ...@@ -504,7 +503,7 @@ LONG WINAPI LPropCompareProp(LPSPropValue lpPropLeft, LPSPropValue lpPropRight)
case PT_STRING8: case PT_STRING8:
return lstrcmpA(lpPropLeft->Value.lpszA, lpPropRight->Value.lpszA); return lstrcmpA(lpPropLeft->Value.lpszA, lpPropRight->Value.lpszA);
case PT_UNICODE: case PT_UNICODE:
return strcmpW(lpPropLeft->Value.lpszW, lpPropRight->Value.lpszW); return lstrcmpW(lpPropLeft->Value.lpszW, lpPropRight->Value.lpszW);
case PT_ERROR: case PT_ERROR:
if (lpPropLeft->Value.err > lpPropRight->Value.err) if (lpPropLeft->Value.err > lpPropRight->Value.err)
return 1; return 1;
...@@ -828,7 +827,7 @@ SCODE WINAPI ScCopyProps(int cValues, LPSPropValue lpProps, LPVOID lpDst, ULONG ...@@ -828,7 +827,7 @@ SCODE WINAPI ScCopyProps(int cValues, LPSPropValue lpProps, LPVOID lpDst, ULONG
lpDataDest += ulLen; lpDataDest += ulLen;
break; break;
case PT_UNICODE: case PT_UNICODE:
ulLen = (strlenW(lpProps->Value.lpszW) + 1u) * sizeof(WCHAR); ulLen = (lstrlenW(lpProps->Value.lpszW) + 1u) * sizeof(WCHAR);
lpDest->Value.lpszW = (LPWSTR)lpDataDest; lpDest->Value.lpszW = (LPWSTR)lpDataDest;
memcpy(lpDest->Value.lpszW, lpProps->Value.lpszW, ulLen); memcpy(lpDest->Value.lpszW, lpProps->Value.lpszW, ulLen);
lpDataDest += ulLen; lpDataDest += ulLen;
...@@ -867,7 +866,7 @@ SCODE WINAPI ScCopyProps(int cValues, LPSPropValue lpProps, LPVOID lpDst, ULONG ...@@ -867,7 +866,7 @@ SCODE WINAPI ScCopyProps(int cValues, LPSPropValue lpProps, LPVOID lpDst, ULONG
for (i = 0; i < lpProps->Value.MVszW.cValues; i++) 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; lpDest->Value.MVszW.lppszW[i] = (LPWSTR)lpDataDest;
memcpy(lpDataDest, lpProps->Value.MVszW.lppszW[i], ulStrLen); memcpy(lpDataDest, lpProps->Value.MVszW.lppszW[i], ulStrLen);
...@@ -981,7 +980,7 @@ SCODE WINAPI ScRelocProps(int cValues, LPSPropValue lpProps, LPVOID lpOld, ...@@ -981,7 +980,7 @@ SCODE WINAPI ScRelocProps(int cValues, LPSPropValue lpProps, LPVOID lpOld,
ulLen = bBadPtr ? 0 : (lstrlenW(lpDest->Value.lpszW) + 1u) * sizeof(WCHAR); ulLen = bBadPtr ? 0 : (lstrlenW(lpDest->Value.lpszW) + 1u) * sizeof(WCHAR);
lpDest->Value.lpszW = (LPWSTR)RELOC_PTR(lpDest->Value.lpszW); lpDest->Value.lpszW = (LPWSTR)RELOC_PTR(lpDest->Value.lpszW);
if (bBadPtr) if (bBadPtr)
ulLen = (strlenW(lpDest->Value.lpszW) + 1u) * sizeof(WCHAR); ulLen = (lstrlenW(lpDest->Value.lpszW) + 1u) * sizeof(WCHAR);
ulCount += ulLen; ulCount += ulLen;
break; break;
case PT_BINARY: case PT_BINARY:
...@@ -1020,11 +1019,11 @@ SCODE WINAPI ScRelocProps(int cValues, LPSPropValue lpProps, LPVOID lpOld, ...@@ -1020,11 +1019,11 @@ SCODE WINAPI ScRelocProps(int cValues, LPSPropValue lpProps, LPVOID lpOld,
for (i = 0; i < lpDest->Value.MVszW.cValues; i++) 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]); lpDest->Value.MVszW.lppszW[i] = (LPWSTR)RELOC_PTR(lpDest->Value.MVszW.lppszW[i]);
if (bBadPtr) if (bBadPtr)
ulStrLen = (strlenW(lpDest->Value.MVszW.lppszW[i]) + 1u) * sizeof(WCHAR); ulStrLen = (lstrlenW(lpDest->Value.MVszW.lppszW[i]) + 1u) * sizeof(WCHAR);
ulCount += ulStrLen; ulCount += ulStrLen;
} }
break; break;
......
...@@ -19,8 +19,6 @@ ...@@ -19,8 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h"
#include "wine/port.h"
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include "objbase.h" #include "objbase.h"
#include "shlwapi.h" #include "shlwapi.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/unicode.h"
#include "mapival.h" #include "mapival.h"
#include "xcmc.h" #include "xcmc.h"
#include "msi.h" #include "msi.h"
...@@ -404,7 +403,7 @@ VOID WINAPI SwapPword(PUSHORT lpData, ULONG ulLen) ...@@ -404,7 +403,7 @@ VOID WINAPI SwapPword(PUSHORT lpData, ULONG ulLen)
ULONG WINAPI MNLS_lstrlenW(LPCWSTR lpszStr) ULONG WINAPI MNLS_lstrlenW(LPCWSTR lpszStr)
{ {
TRACE("(%s)\n", debugstr_w(lpszStr)); TRACE("(%s)\n", debugstr_w(lpszStr));
return strlenW(lpszStr); return lstrlenW(lpszStr);
} }
/************************************************************************* /*************************************************************************
...@@ -423,7 +422,7 @@ ULONG WINAPI MNLS_lstrlenW(LPCWSTR lpszStr) ...@@ -423,7 +422,7 @@ ULONG WINAPI MNLS_lstrlenW(LPCWSTR lpszStr)
INT WINAPI MNLS_lstrcmpW(LPCWSTR lpszLeft, LPCWSTR lpszRight) INT WINAPI MNLS_lstrcmpW(LPCWSTR lpszLeft, LPCWSTR lpszRight)
{ {
TRACE("(%s,%s)\n", debugstr_w(lpszLeft), debugstr_w(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) ...@@ -443,7 +442,7 @@ ULONG WINAPI MNLS_lstrcpyW(LPWSTR lpszDest, LPCWSTR lpszSrc)
ULONG len; ULONG len;
TRACE("(%p,%s)\n", lpszDest, debugstr_w(lpszSrc)); TRACE("(%p,%s)\n", lpszDest, debugstr_w(lpszSrc));
len = (strlenW(lpszSrc) + 1) * sizeof(WCHAR); len = (lstrlenW(lpszSrc) + 1) * sizeof(WCHAR);
memcpy(lpszDest, lpszSrc, len); memcpy(lpszDest, lpszSrc, len);
return len; return len;
} }
...@@ -494,7 +493,7 @@ BOOL WINAPI FEqualNames(LPMAPINAMEID lpName1, LPMAPINAMEID lpName2) ...@@ -494,7 +493,7 @@ BOOL WINAPI FEqualNames(LPMAPINAMEID lpName1, LPMAPINAMEID lpName2)
return FALSE; return FALSE;
if (lpName1->ulKind == MNID_STRING) 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; return lpName1->Kind.lID == lpName2->Kind.lID;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment