Commit d1e3d8d8 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Replaced LocalToWideChar() by lstrcpynAtoW(), WideCharToLocal() by

lstrcpynWtoA().
parent 7e70e56b
......@@ -287,7 +287,7 @@ HRESULT WINAPI SHILCreateFromPathA (LPCSTR path, LPITEMIDLIST * ppidl, DWORD * a
TRACE_(shell)("%s %p 0x%08lx\n",path,ppidl,attributes?*attributes:0);
LocalToWideChar(lpszDisplayName, path, MAX_PATH);
lstrcpynAtoW(lpszDisplayName, path, MAX_PATH);
if (SUCCEEDED (SHGetDesktopFolder(&sf)))
{
......@@ -763,7 +763,7 @@ LPITEMIDLIST WINAPI SHSimpleIDListFromPathW (LPWSTR lpszPath)
char lpszTemp[MAX_PATH];
TRACE("path=%s\n",debugstr_w(lpszPath));
WideCharToLocal(lpszTemp, lpszPath, MAX_PATH);
lstrcpynWtoA(lpszTemp, lpszPath, MAX_PATH);
return SHSimpleIDListFromPathA (lpszTemp);
}
......
......@@ -569,7 +569,7 @@ static HRESULT WINAPI IShellFolder_fnParseDisplayName(
szNext = GetNextElementW(lpszDisplayName, szElement, MAX_PATH);
/* build the full pathname to the element */
WideCharToLocal(szTempA, szElement, lstrlenW(szElement) + 1);
lstrcpynWtoA(szTempA, szElement, lstrlenW(szElement) + 1);
strcpy(szPath, This->sMyPath);
PathAddBackslashA(szPath);
strcat(szPath, szTempA);
......@@ -1807,7 +1807,7 @@ static HRESULT WINAPI ISF_MyComputer_fnParseDisplayName(
if (PathIsRootW(lpszDisplayName))
{
szNext = GetNextElementW(lpszDisplayName, szElement, MAX_PATH);
WideCharToLocal(szTempA, szElement, lstrlenW(szElement) + 1);
lstrcpynWtoA(szTempA, szElement, lstrlenW(szElement) + 1);
pidlTemp = _ILCreateDrive(szTempA);
if (szNext && *szNext)
......
......@@ -3,8 +3,6 @@
#include "windef.h"
INT WINAPI WideCharToLocal(LPSTR,LPCWSTR,INT);
INT WINAPI LocalToWideChar(LPWSTR,LPCSTR,INT);
LPWSTR WINAPI lstrcpyAtoW(LPWSTR,LPCSTR);
LPSTR WINAPI lstrcpyWtoA(LPSTR,LPCWSTR);
LPWSTR WINAPI lstrcpynAtoW(LPWSTR,LPCSTR,INT);
......
......@@ -634,41 +634,6 @@ BOOL WINAPI OemToCharW( LPCSTR s, LPWSTR d )
}
/***********************************************************************
* WideCharToLocal (Not a Windows API)
* similar lstrcpyWtoA, should handle codepages properly
*
* RETURNS
* strlen of the destination string
*/
INT WINAPI WideCharToLocal(
LPSTR pLocal,
LPCWSTR pWide,
INT dwChars)
{ *pLocal = 0;
TRACE("(%p, %s, %i)\n", pLocal, debugstr_wn(pWide,dwChars), dwChars);
WideCharToMultiByte(CP_ACP,0,pWide,-1,pLocal,dwChars,NULL,NULL);
return strlen(pLocal);
}
/***********************************************************************
* LocalToWideChar (Not a Windows API)
* similar lstrcpyAtoW, should handle codepages properly
*
* RETURNS
* strlen of the destination string
*/
INT WINAPI LocalToWideChar(
LPWSTR pWide,
LPCSTR pLocal,
INT dwChars)
{ *pWide = 0;
TRACE("(%p, %s, %i)\n", pWide, debugstr_an(pLocal,dwChars), dwChars);
MultiByteToWideChar(CP_ACP,0,pLocal,-1,pWide,dwChars);
return lstrlenW(pWide);
}
/***********************************************************************
* lstrrchr (Not a Windows API)
*
* This is the implementation meant to be invoked from within
......
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