shlwapi: Build with msvcrt.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-06-20 09:13:05 +02:00
parent 605f503a8a
commit c9205f1761
9 changed files with 63 additions and 85 deletions

View file

@ -4,6 +4,8 @@ IMPORTLIB = shlwapi
IMPORTS = uuid user32 gdi32 advapi32 kernelbase
DELAYIMPORTS = userenv oleaut32 ole32 comctl32 comdlg32 mpr mlang urlmon shell32 winmm version
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
assoc.c \
clist.c \

View file

@ -28,7 +28,6 @@
#include "shlguid.h"
#include "shlobj.h"
#include "shlwapi.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);

View file

@ -18,9 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
@ -29,7 +26,6 @@
#include "winuser.h"
#include "winreg.h"
#include "shlwapi.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "resource.h"

View file

@ -20,9 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
@ -47,7 +44,6 @@
#include "commdlg.h"
#include "mlang.h"
#include "mshtmhst.h"
#include "wine/unicode.h"
#include "wine/debug.h"
@ -501,11 +497,11 @@ INT WINAPI SHStringFromGUIDW(REFGUID guid, LPWSTR lpszDest, INT cchMax)
TRACE("(%s,%p,%d)\n", debugstr_guid(guid), lpszDest, cchMax);
sprintfW(xguid, wszFormat, guid->Data1, guid->Data2, guid->Data3,
swprintf(xguid, ARRAY_SIZE(xguid), wszFormat, guid->Data1, guid->Data2, guid->Data3,
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7]);
iLen = strlenW(xguid) + 1;
iLen = lstrlenW(xguid) + 1;
if (iLen > cchMax)
return 0;
@ -602,7 +598,7 @@ BOOL WINAPI SHAboutInfoW(LPWSTR lpszDest, DWORD dwDestLen)
dwLen = 30;
if (!SHGetValueW(HKEY_LOCAL_MACHINE, szIEKey, szVersion, &dwType, buff, &dwLen))
{
DWORD dwStrLen = strlenW(buff);
DWORD dwStrLen = lstrlenW(buff);
dwLen = 30 - dwStrLen;
SHGetValueW(HKEY_LOCAL_MACHINE, szIEKey,
szCustomized, &dwType, buff+dwStrLen, &dwLen);
@ -2756,13 +2752,13 @@ DWORD WINAPI SHGetIniStringW(LPCWSTR appName, LPCWSTR keyName, LPWSTR out,
ret = GetPrivateProfileStringW(appName, keyName, NULL, buf, outLen, filename);
if(ret)
strcpyW(out, buf);
lstrcpyW(out, buf);
else
*out = 0;
HeapFree(GetProcessHeap(), 0, buf);
return strlenW(out);
return lstrlenW(out);
}
/*************************************************************************
@ -3106,9 +3102,9 @@ HMODULE WINAPI MLLoadLibraryW(LPCWSTR new_mod, HMODULE inst_hwnd, DWORD dwCrossC
len = GetModuleFileNameW(inst_hwnd, mod_path, ARRAY_SIZE(mod_path));
if (!len || len >= ARRAY_SIZE(mod_path)) return NULL;
ptr = strrchrW(mod_path, '\\');
ptr = wcsrchr(mod_path, '\\');
if (ptr) {
strcpyW(ptr+1, new_mod);
lstrcpyW(ptr+1, new_mod);
TRACE("loading %s\n", debugstr_w(mod_path));
return LoadLibraryW(mod_path);
}
@ -4669,7 +4665,7 @@ DWORD WINAPI SHGetObjectCompatFlags(IUnknown *pUnk, const CLSID *clsid)
}
StringFromCLSID(clsid, &clsid_str);
sprintfW(strW, compatpathW, clsid_str);
swprintf(strW, ARRAY_SIZE(strW), compatpathW, clsid_str);
CoTaskMemFree(clsid_str);
ret = RegOpenKeyW(HKEY_LOCAL_MACHINE, strW, &key);
@ -4687,7 +4683,7 @@ DWORD WINAPI SHGetObjectCompatFlags(IUnknown *pUnk, const CLSID *clsid)
while (right >= left) {
x = (left + right) / 2;
res = strcmpW(strW, objcompat_table[x].name);
res = wcscmp(strW, objcompat_table[x].name);
if (res == 0)
{
ret |= objcompat_table[x].value;

View file

@ -19,14 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include "wine/unicode.h"
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
@ -272,7 +268,7 @@ static BOOL SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
return FALSE;
if (PathFileExistsDefExtW(buff, dwWhich))
{
strcpyW(lpszFile, buff);
lstrcpyW(lpszFile, buff);
return TRUE;
}
GetWindowsDirectoryW(buff, MAX_PATH);
@ -280,7 +276,7 @@ static BOOL SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
return FALSE;
if (PathFileExistsDefExtW(buff, dwWhich))
{
strcpyW(lpszFile, buff);
lstrcpyW(lpszFile, buff);
return TRUE;
}
GetWindowsDirectoryW(buff, MAX_PATH);
@ -288,7 +284,7 @@ static BOOL SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
return FALSE;
if (PathFileExistsDefExtW(buff, dwWhich))
{
strcpyW(lpszFile, buff);
lstrcpyW(lpszFile, buff);
return TRUE;
}
/* Try dirs listed in %PATH% */
@ -322,7 +318,7 @@ static BOOL SHLWAPI_PathFindInOtherDirs(LPWSTR lpszFile, DWORD dwWhich)
}
if (PathFileExistsDefExtW(buff, dwWhich))
{
strcpyW(lpszFile, buff);
lstrcpyW(lpszFile, buff);
HeapFree(GetProcessHeap(), 0, lpszPATH);
return TRUE;
}
@ -407,7 +403,7 @@ BOOL WINAPI PathFindOnPathExW(LPWSTR lpszFile,LPCWSTR *lppszOtherDirs,DWORD dwWh
PathCombineW(buff, *lpszOtherPath, lpszFile);
if (PathFileExistsDefExtW(buff, dwWhich))
{
strcpyW(lpszFile, buff);
lstrcpyW(lpszFile, buff);
return TRUE;
}
lpszOtherPath++;
@ -521,7 +517,7 @@ BOOL WINAPI PathCompactPathExW(LPWSTR lpszDest, LPCWSTR lpszPath,
if (cchMax < 2)
return TRUE;
dwLen = strlenW(lpszPath) + 1;
dwLen = lstrlenW(lpszPath) + 1;
if (dwLen < cchMax)
{
@ -547,7 +543,7 @@ BOOL WINAPI PathCompactPathExW(LPWSTR lpszDest, LPCWSTR lpszPath,
/* Compact the file name with ellipses at the end */
cchMax -= 4;
memcpy(lpszDest, lpszFile, cchMax * sizeof(WCHAR));
strcpyW(lpszDest + cchMax, szEllipses);
lstrcpyW(lpszDest + cchMax, szEllipses);
return TRUE;
}
/* We have a root in the path */
@ -564,7 +560,7 @@ BOOL WINAPI PathCompactPathExW(LPWSTR lpszDest, LPCWSTR lpszPath,
*lpszDest = '\0';
return TRUE;
}
strcpyW(lpszDest, szEllipses);
lstrcpyW(lpszDest, szEllipses);
lpszDest += 3;
cchMax -= 4;
*lpszDest++ = *lpszFile++;
@ -577,15 +573,15 @@ BOOL WINAPI PathCompactPathExW(LPWSTR lpszDest, LPCWSTR lpszPath,
}
cchMax -= 4;
memcpy(lpszDest, lpszFile, cchMax * sizeof(WCHAR));
strcpyW(lpszDest + cchMax, szEllipses);
lstrcpyW(lpszDest + cchMax, szEllipses);
return TRUE;
}
/* Only the root needs to be Compacted */
dwLen = cchMax - dwFileLen - 3;
memcpy(lpszDest, lpszPath, dwLen * sizeof(WCHAR));
strcpyW(lpszDest + dwLen, szEllipses);
strcpyW(lpszDest + dwLen + 3, lpszFile);
lstrcpyW(lpszDest + dwLen, szEllipses);
lstrcpyW(lpszDest + dwLen + 3, lpszFile);
return TRUE;
}
@ -761,7 +757,7 @@ BOOL WINAPI PathIsContentTypeW(LPCWSTR lpszPath, LPCWSTR lpszContentType)
if (lpszPath && (szExt = PathFindExtensionW(lpszPath)) && *szExt &&
!SHGetValueW(HKEY_CLASSES_ROOT, szExt, szContentType,
REG_NONE, szBuff, &dwDummy) &&
!strcmpiW(lpszContentType, szBuff))
!wcsicmp(lpszContentType, szBuff))
{
return TRUE;
}
@ -869,14 +865,14 @@ BOOL WINAPI PathMakePrettyW(LPWSTR lpszPath)
{
do
{
if (islowerW(*pszIter))
if (iswlower(*pszIter))
return FALSE; /* Not DOS path */
pszIter++;
} while (*pszIter);
pszIter = lpszPath + 1;
while (*pszIter)
{
*pszIter = tolowerW(*pszIter);
*pszIter = towlower(*pszIter);
pszIter++;
}
}
@ -936,7 +932,7 @@ BOOL WINAPI PathCompactPathW(HDC hDC, LPWSTR lpszPath, UINT dx)
hdc = hDC = GetDC(0);
/* Get the length of the whole path */
dwLen = strlenW(lpszPath);
dwLen = lstrlenW(lpszPath);
GetTextExtentPointW(hDC, lpszPath, dwLen, &size);
if ((UINT)size.cx > dx)
@ -952,7 +948,7 @@ BOOL WINAPI PathCompactPathW(HDC hDC, LPWSTR lpszPath, UINT dx)
GetTextExtentPointW(hDC, szEllipses, 3, &size);
dwEllipsesLen = size.cx;
/* Get the size of the file name */
GetTextExtentPointW(hDC, sFile, strlenW(sFile), &size);
GetTextExtentPointW(hDC, sFile, lstrlenW(sFile), &size);
dwPathLen = size.cx;
if (sFile != lpszPath)
@ -986,14 +982,14 @@ BOOL WINAPI PathCompactPathW(HDC hDC, LPWSTR lpszPath, UINT dx)
{
if (bEllipses)
{
strcpyW(sPath, szEllipses);
strcpyW(sPath+3, buff);
lstrcpyW(sPath, szEllipses);
lstrcpyW(sPath+3, buff);
}
bRet = TRUE;
goto end;
}
strcpyW(lpszPath, szEllipses);
strcpyW(lpszPath+3, buff);
lstrcpyW(lpszPath, szEllipses);
lstrcpyW(lpszPath+3, buff);
bRet = FALSE;
goto end;
}
@ -1001,7 +997,7 @@ BOOL WINAPI PathCompactPathW(HDC hDC, LPWSTR lpszPath, UINT dx)
/* Trim the path by adding ellipses to the end, e.g:
* A very long file name.txt ==> A very...
*/
dwLen = strlenW(lpszPath);
dwLen = lstrlenW(lpszPath);
if (dwLen > MAX_PATH - 3)
dwLen = MAX_PATH - 3;
@ -1030,8 +1026,8 @@ BOOL WINAPI PathCompactPathW(HDC hDC, LPWSTR lpszPath, UINT dx)
}
else
{
strcpyW(buff + dwLen, szEllipses);
strcpyW(lpszPath, buff);
lstrcpyW(buff + dwLen, szEllipses);
lstrcpyW(lpszPath, buff);
}
}
@ -1109,11 +1105,11 @@ BOOL WINAPI PathMakeSystemFolderW(LPCWSTR lpszPath)
/* If the directory is already a system directory, don't do anything */
GetSystemDirectoryW(buff, MAX_PATH);
if (!strcmpW(buff, lpszPath))
if (!wcscmp(buff, lpszPath))
return TRUE;
GetWindowsDirectoryW(buff, MAX_PATH);
if (!strcmpW(buff, lpszPath))
if (!wcscmp(buff, lpszPath))
return TRUE;
/* "UseSystemForSystemFolders" Tells Win what attributes to use */
@ -1342,11 +1338,11 @@ BOOL WINAPI PathIsDirectoryEmptyW(LPCWSTR lpszPath)
lstrcpynW(szSearch, lpszPath, MAX_PATH);
PathAddBackslashW(szSearch);
dwLen = strlenW(szSearch);
dwLen = lstrlenW(szSearch);
if (dwLen > MAX_PATH - 4)
return FALSE;
strcpyW(szSearch + dwLen, szAllFiles);
lstrcpyW(szSearch + dwLen, szAllFiles);
hfind = FindFirstFileW(szSearch, &find_data);
if (hfind == INVALID_HANDLE_VALUE)
return FALSE;
@ -1428,14 +1424,14 @@ LPCWSTR WINAPI PathFindSuffixArrayW(LPCWSTR lpszSuffix, LPCWSTR *lppszArray, int
if (lpszSuffix && lppszArray && dwCount > 0)
{
dwLen = strlenW(lpszSuffix);
dwLen = lstrlenW(lpszSuffix);
while (dwRet < dwCount)
{
size_t dwCompareLen = strlenW(*lppszArray);
size_t dwCompareLen = lstrlenW(*lppszArray);
if (dwCompareLen < dwLen)
{
if (!strcmpW(lpszSuffix + dwLen - dwCompareLen, *lppszArray))
if (!wcscmp(lpszSuffix + dwLen - dwCompareLen, *lppszArray))
return *lppszArray; /* Found */
}
dwRet++;
@ -1504,7 +1500,7 @@ VOID WINAPI PathUndecorateW(LPWSTR lpszPath)
if (*lpszSkip == '[')
lpszSkip++; /* [] (no number) */
else
while (lpszSkip > lpszPath && isdigitW(lpszSkip[-1]))
while (lpszSkip > lpszPath && iswdigit(lpszSkip[-1]))
lpszSkip--;
if (lpszSkip > lpszPath && lpszSkip[-1] == '[' && lpszSkip[-2] != '\\')
{
@ -1565,12 +1561,12 @@ HRESULT WINAPI SHGetWebFolderFilePathW(LPCWSTR lpszFile, LPWSTR lpszPath, DWORD
if (dwLen > 0 && lpszPath[dwLen-1] == '\\')
dwLen--;
dwFileLen = strlenW(lpszFile);
dwFileLen = lstrlenW(lpszFile);
if (dwLen + dwFileLen + ARRAY_SIZE(szWeb) >= dwPathLen)
return E_FAIL; /* lpszPath too short */
strcpyW(lpszPath+dwLen, szWeb);
lstrcpyW(lpszPath+dwLen, szWeb);
dwLen += ARRAY_SIZE(szWeb);
dwPathLen = dwPathLen - dwLen; /* Remaining space */
@ -1583,14 +1579,14 @@ HRESULT WINAPI SHGetWebFolderFilePathW(LPCWSTR lpszFile, LPWSTR lpszPath, DWORD
{
/* Use localised content in the users UI language if present */
wsprintfW(lpszPath + dwLen, szWebMui, lidUser);
strcpyW(lpszPath + dwLen + ARRAY_SIZE(szWebMui), lpszFile);
lstrcpyW(lpszPath + dwLen + ARRAY_SIZE(szWebMui), lpszFile);
if (PathFileExistsW(lpszPath))
return S_OK;
}
}
/* Fall back to OS default installed content */
strcpyW(lpszPath + dwLen, lpszFile);
lstrcpyW(lpszPath + dwLen, lpszFile);
if (PathFileExistsW(lpszPath))
return S_OK;
return E_FAIL;

View file

@ -28,7 +28,6 @@
#include "wine/debug.h"
#define NO_SHLWAPI_STREAM
#include "shlwapi.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
@ -667,7 +666,7 @@ BOOL WINAPI RegisterMIMETypeForExtensionW(LPCWSTR lpszSubKey, LPCWSTR lpszValue)
}
return !SHSetValueW(HKEY_CLASSES_ROOT, lpszSubKey, lpszContentTypeW,
REG_SZ, lpszValue, strlenW(lpszValue));
REG_SZ, lpszValue, lstrlenW(lpszValue));
}
/*************************************************************************
@ -743,7 +742,7 @@ BOOL WINAPI GetMIMETypeSubKeyW(LPCWSTR lpszType, LPWSTR lpszBuffer, DWORD dwLen)
if (dwLen > dwLenMimeDbContent && lpszType && lpszBuffer)
{
DWORD dwStrLen = strlenW(lpszType);
DWORD dwStrLen = lstrlenW(lpszType);
if (dwStrLen < dwLen - dwLenMimeDbContent)
{
@ -818,7 +817,7 @@ BOOL WINAPI MIME_GetExtensionW(LPCWSTR lpszType, LPWSTR lpExt, INT iLen)
lpExt[1])
{
if (lpExt[1] == '.')
memmove(lpExt, lpExt + 1, (strlenW(lpExt + 1) + 1) * sizeof(WCHAR));
memmove(lpExt, lpExt + 1, (lstrlenW(lpExt + 1) + 1) * sizeof(WCHAR));
else
*lpExt = '.'; /* Supply a '.' */
bRet = TRUE;
@ -1006,7 +1005,7 @@ HRESULT WINAPI SHRegGetCLSIDKeyW(REFGUID guid, LPCWSTR lpszValue, BOOL bUseHKCU,
if(lpszValue)
{
szKey[ARRAY_SIZE(szClassIdKey) + 39] = '\\';
strcpyW(szKey + ARRAY_SIZE(szClassIdKey) + 40, lpszValue); /* Append value name */
lstrcpyW(szKey + ARRAY_SIZE(szClassIdKey) + 40, lpszValue); /* Append value name */
}
hkey = bUseHKCU ? HKEY_CURRENT_USER : HKEY_CLASSES_ROOT;

View file

@ -23,9 +23,6 @@
* B) Want to use a substandard API to tune its performance.
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>

View file

@ -19,9 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <math.h>
#include <stdarg.h>
#include <stdio.h>
@ -39,7 +36,6 @@
#include "shlobj.h"
#include "mlang.h"
#include "ddeml.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "resource.h"
@ -133,7 +129,7 @@ static int FormatDouble(double value, int decimals, LPWSTR pszBuf, int cchBuf)
NUMBERFMTW fmt;
WCHAR decimal[8], thousand[8];
snprintfW(buf, 64, flfmt, value);
swprintf(buf, 64, flfmt, value);
FillNumberFmt(&fmt, decimal, ARRAY_SIZE(decimal), thousand, ARRAY_SIZE(thousand));
fmt.NumDigits = decimals;
@ -157,7 +153,7 @@ LPWSTR WINAPI StrCatW(LPWSTR lpszStr, LPCWSTR lpszSrc)
TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSrc));
if (lpszStr && lpszSrc)
strcatW(lpszStr, lpszSrc);
lstrcatW(lpszStr, lpszSrc);
return lpszStr;
}
@ -178,7 +174,7 @@ LPWSTR WINAPI StrCpyW(LPWSTR lpszStr, LPCWSTR lpszSrc)
TRACE("(%p,%s)\n", lpszStr, debugstr_w(lpszSrc));
if (lpszStr && lpszSrc)
strcpyW(lpszStr, lpszSrc);
lstrcpyW(lpszStr, lpszSrc);
return lpszStr;
}
@ -269,7 +265,7 @@ HRESULT WINAPI StrRetToBufW (LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest,
size_t dst_len;
if (!src->u.pOleStr)
return E_FAIL;
dst_len = strlenW(src->u.pOleStr);
dst_len = lstrlenW(src->u.pOleStr);
memcpy(dest, src->u.pOleStr, min(dst_len, len-1) * sizeof(WCHAR));
dest[min(dst_len, len-1)] = 0;
CoTaskMemFree(src->u.pOleStr);
@ -536,7 +532,7 @@ LPWSTR WINAPI StrNCatW(LPWSTR lpszStr, LPCWSTR lpszCat, INT cchMax)
return NULL;
}
StrCpyNW(lpszStr + strlenW(lpszStr), lpszCat, cchMax);
StrCpyNW(lpszStr + lstrlenW(lpszStr), lpszCat, cchMax);
return lpszRet;
}
@ -718,7 +714,7 @@ static int SHLWAPI_WriteTimeClass(LPWSTR lpszOut, DWORD dwValue,
iDigits = SHLWAPI_FormatSignificant(szOut + 1, iDigits);
*szOut = ' ';
LoadStringW(shlwapi_hInstance, uClassStringId, szBuff + 32, 32);
strcatW(lpszOut, szOut);
lstrcatW(lpszOut, szOut);
return iDigits;
}
@ -812,7 +808,7 @@ INT WINAPI StrFromTimeIntervalW(LPWSTR lpszStr, UINT cchMax, DWORD dwMS,
SHLWAPI_WriteTimeClass(szCopy, dwMS, IDS_TIME_INTERVAL_SECONDS, iDigits);
lstrcpynW(lpszStr, szCopy, cchMax);
iRet = strlenW(lpszStr);
iRet = lstrlenW(lpszStr);
}
return iRet;
}
@ -883,7 +879,7 @@ LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
{
WCHAR wszBytesFormat[64];
LoadStringW(shlwapi_hInstance, IDS_BYTES_FORMAT, wszBytesFormat, 64);
snprintfW(lpszDest, cchMax, wszBytesFormat, (int)llBytes);
swprintf(lpszDest, cchMax, wszBytesFormat, (int)llBytes);
return lpszDest;
}
@ -1014,7 +1010,7 @@ WCHAR WINAPI SHStripMneumonicW(LPCWSTR lpszStr)
if (*lpszTmp != '&')
ch = *lpszTmp;
memmove( lpszIter, lpszTmp, (strlenW(lpszTmp) + 1) * sizeof(WCHAR) );
memmove( lpszIter, lpszTmp, (lstrlenW(lpszTmp) + 1) * sizeof(WCHAR) );
}
}
@ -1099,7 +1095,7 @@ DWORD WINAPI SHUnicodeToAnsiCP(UINT CodePage, LPCWSTR lpSrcStr, LPSTR lpDstStr,
*lpDstStr = '\0';
len = strlenW(lpSrcStr) + 1;
len = lstrlenW(lpSrcStr) + 1;
switch (CodePage)
{
@ -1228,5 +1224,5 @@ BOOL WINAPI DoesStringRoundTripW(LPCWSTR lpSrcStr, LPSTR lpDst, INT iLen)
SHUnicodeToAnsi(lpSrcStr, lpDst, iLen);
SHAnsiToUnicode(lpDst, szBuff, MAX_PATH);
return !strcmpW(lpSrcStr, szBuff);
return !wcscmp(lpSrcStr, szBuff);
}

View file

@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
@ -27,7 +25,6 @@
#include "winbase.h"
#include "winnls.h"
#include "winerror.h"
#include "wine/unicode.h"
#include "wininet.h"
#include "winreg.h"
#include "winternl.h"
@ -136,7 +133,7 @@ HRESULT WINAPI MLBuildResURLW(LPCWSTR lpszLibName, HMODULE hMod, DWORD dwFlags,
len = GetModuleFileNameW(hMod, szBuff, ARRAY_SIZE(szBuff));
if (len && len < ARRAY_SIZE(szBuff))
{
DWORD dwPathLen = strlenW(szBuff) + 1;
DWORD dwPathLen = lstrlenW(szBuff) + 1;
if (dwDestLen >= dwPathLen)
{
@ -145,7 +142,7 @@ HRESULT WINAPI MLBuildResURLW(LPCWSTR lpszLibName, HMODULE hMod, DWORD dwFlags,
dwDestLen -= dwPathLen;
memcpy(lpszDest + szResLen, szBuff, dwPathLen * sizeof(WCHAR));
dwResLen = strlenW(lpszRes) + 1;
dwResLen = lstrlenW(lpszRes) + 1;
if (dwDestLen >= dwResLen + 1)
{
lpszDest[szResLen + dwPathLen-1] = '/';