Replaced LocalToWideChar() by lstrcpynAtoW(), WideCharToLocal() by
lstrcpynWtoA().
This commit is contained in:
parent
7e70e56b3f
commit
d1e3d8d841
|
@ -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);
|
||||
|
|
|
@ -633,41 +633,6 @@ BOOL WINAPI OemToCharW( LPCSTR s, LPWSTR d )
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* 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)
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue