mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
Use the ACP define in MB/WC conversion functions.
This commit is contained in:
parent
28a8cacaf5
commit
67cfcfb919
@ -140,11 +140,11 @@ LPSTR WINAPI PathCombineA(LPSTR lpszDest, LPCSTR lpszDir, LPCSTR lpszFile)
|
||||
WCHAR szDir[MAX_PATH];
|
||||
WCHAR szFile[MAX_PATH];
|
||||
if (lpszDir)
|
||||
MultiByteToWideChar(0,0,lpszDir,-1,szDir,MAX_PATH);
|
||||
MultiByteToWideChar(CP_ACP,0,lpszDir,-1,szDir,MAX_PATH);
|
||||
if (lpszFile)
|
||||
MultiByteToWideChar(0,0,lpszFile,-1,szFile,MAX_PATH);
|
||||
MultiByteToWideChar(CP_ACP,0,lpszFile,-1,szFile,MAX_PATH);
|
||||
PathCombineW(szDest, lpszDir ? szDir : NULL, lpszFile ? szFile : NULL);
|
||||
WideCharToMultiByte(0,0,szDest,-1,lpszDest,MAX_PATH,0,0);
|
||||
WideCharToMultiByte(CP_ACP,0,szDest,-1,lpszDest,MAX_PATH,0,0);
|
||||
}
|
||||
return lpszDest;
|
||||
}
|
||||
@ -1125,10 +1125,10 @@ BOOL WINAPI PathFileExistsDefExtA(LPSTR lpszPath,DWORD dwWhich)
|
||||
if (lpszPath)
|
||||
{
|
||||
WCHAR szPath[MAX_PATH];
|
||||
MultiByteToWideChar(0,0,lpszPath,-1,szPath,MAX_PATH);
|
||||
MultiByteToWideChar(CP_ACP,0,lpszPath,-1,szPath,MAX_PATH);
|
||||
bRet = PathFileExistsDefExtW(szPath, dwWhich);
|
||||
if (bRet)
|
||||
WideCharToMultiByte(0,0,szPath,-1,lpszPath,MAX_PATH,0,0);
|
||||
WideCharToMultiByte(CP_ACP,0,szPath,-1,lpszPath,MAX_PATH,0,0);
|
||||
}
|
||||
return bRet;
|
||||
}
|
||||
@ -1238,7 +1238,7 @@ BOOL WINAPI PathFindOnPathExA(LPSTR lpszFile,LPCSTR *lppszOtherDirs,DWORD dwWhic
|
||||
if (!lpszFile || !PathIsFileSpecA(lpszFile))
|
||||
return FALSE;
|
||||
|
||||
MultiByteToWideChar(0,0,lpszFile,-1,szFile,MAX_PATH);
|
||||
MultiByteToWideChar(CP_ACP,0,lpszFile,-1,szFile,MAX_PATH);
|
||||
|
||||
/* Search provided directories first */
|
||||
if (lppszOtherDirs && *lppszOtherDirs)
|
||||
@ -1248,11 +1248,11 @@ BOOL WINAPI PathFindOnPathExA(LPSTR lpszFile,LPCSTR *lppszOtherDirs,DWORD dwWhic
|
||||
|
||||
while (lpszOtherPath && *lpszOtherPath && (*lpszOtherPath)[0])
|
||||
{
|
||||
MultiByteToWideChar(0,0,*lpszOtherPath,-1,szOther,MAX_PATH);
|
||||
MultiByteToWideChar(CP_ACP,0,*lpszOtherPath,-1,szOther,MAX_PATH);
|
||||
PathCombineW(buff, szOther, szFile);
|
||||
if (PathFileExistsDefExtW(buff, dwWhich))
|
||||
{
|
||||
WideCharToMultiByte(0,0,buff,-1,lpszFile,MAX_PATH,0,0);
|
||||
WideCharToMultiByte(CP_ACP,0,buff,-1,lpszFile,MAX_PATH,0,0);
|
||||
return TRUE;
|
||||
}
|
||||
lpszOtherPath++;
|
||||
@ -1261,7 +1261,7 @@ BOOL WINAPI PathFindOnPathExA(LPSTR lpszFile,LPCSTR *lppszOtherDirs,DWORD dwWhic
|
||||
/* Not found, try system and path dirs */
|
||||
if (SHLWAPI_PathFindInOtherDirs(szFile, dwWhich))
|
||||
{
|
||||
WideCharToMultiByte(0,0,szFile,-1,lpszFile,MAX_PATH,0,0);
|
||||
WideCharToMultiByte(CP_ACP,0,szFile,-1,lpszFile,MAX_PATH,0,0);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
@ -1368,10 +1368,10 @@ BOOL WINAPI PathCompactPathExA(LPSTR lpszDest, LPCSTR lpszPath,
|
||||
WCHAR szPath[MAX_PATH];
|
||||
WCHAR szDest[MAX_PATH];
|
||||
|
||||
MultiByteToWideChar(0,0,lpszPath,-1,szPath,MAX_PATH);
|
||||
MultiByteToWideChar(CP_ACP,0,lpszPath,-1,szPath,MAX_PATH);
|
||||
szDest[0] = '\0';
|
||||
bRet = PathCompactPathExW(szDest, szPath, cchMax, dwFlags);
|
||||
WideCharToMultiByte(0,0,szDest,-1,lpszDest,MAX_PATH,0,0);
|
||||
WideCharToMultiByte(CP_ACP,0,szDest,-1,lpszDest,MAX_PATH,0,0);
|
||||
}
|
||||
return bRet;
|
||||
}
|
||||
@ -2338,9 +2338,9 @@ BOOL WINAPI PathCanonicalizeA(LPSTR lpszBuf, LPCSTR lpszPath)
|
||||
{
|
||||
WCHAR szPath[MAX_PATH];
|
||||
WCHAR szBuff[MAX_PATH];
|
||||
MultiByteToWideChar(0,0,lpszPath,-1,szPath,MAX_PATH);
|
||||
MultiByteToWideChar(CP_ACP,0,lpszPath,-1,szPath,MAX_PATH);
|
||||
bRet = PathCanonicalizeW(szBuff, szPath);
|
||||
WideCharToMultiByte(0,0,szBuff,-1,lpszBuf,MAX_PATH,0,0);
|
||||
WideCharToMultiByte(CP_ACP,0,szBuff,-1,lpszBuf,MAX_PATH,0,0);
|
||||
}
|
||||
return bRet;
|
||||
}
|
||||
@ -2778,9 +2778,9 @@ BOOL WINAPI PathCompactPathA(HDC hDC, LPSTR lpszPath, UINT dx)
|
||||
if (lpszPath)
|
||||
{
|
||||
WCHAR szPath[MAX_PATH];
|
||||
MultiByteToWideChar(0,0,lpszPath,-1,szPath,MAX_PATH);
|
||||
MultiByteToWideChar(CP_ACP,0,lpszPath,-1,szPath,MAX_PATH);
|
||||
bRet = PathCompactPathW(hDC, szPath, dx);
|
||||
WideCharToMultiByte(0,0,szPath,-1,lpszPath,MAX_PATH,0,0);
|
||||
WideCharToMultiByte(CP_ACP,0,szPath,-1,lpszPath,MAX_PATH,0,0);
|
||||
}
|
||||
return bRet;
|
||||
}
|
||||
@ -3010,7 +3010,7 @@ BOOL WINAPI PathMakeSystemFolderA(LPCSTR lpszPath)
|
||||
if (lpszPath && *lpszPath)
|
||||
{
|
||||
WCHAR szPath[MAX_PATH];
|
||||
MultiByteToWideChar(0,0,lpszPath,-1,szPath,MAX_PATH);
|
||||
MultiByteToWideChar(CP_ACP,0,lpszPath,-1,szPath,MAX_PATH);
|
||||
bRet = PathMakeSystemFolderW(szPath);
|
||||
}
|
||||
return bRet;
|
||||
@ -3326,10 +3326,10 @@ BOOL WINAPI PathRelativePathToA(LPSTR lpszPath, LPCSTR lpszFrom, DWORD dwAttrFro
|
||||
WCHAR szPath[MAX_PATH];
|
||||
WCHAR szFrom[MAX_PATH];
|
||||
WCHAR szTo[MAX_PATH];
|
||||
MultiByteToWideChar(0,0,lpszFrom,-1,szFrom,MAX_PATH);
|
||||
MultiByteToWideChar(0,0,lpszTo,-1,szTo,MAX_PATH);
|
||||
MultiByteToWideChar(CP_ACP,0,lpszFrom,-1,szFrom,MAX_PATH);
|
||||
MultiByteToWideChar(CP_ACP,0,lpszTo,-1,szTo,MAX_PATH);
|
||||
bRet = PathRelativePathToW(szPath,szFrom,dwAttrFrom,szTo,dwAttrTo);
|
||||
WideCharToMultiByte(0,0,szPath,-1,lpszPath,MAX_PATH,0,0);
|
||||
WideCharToMultiByte(CP_ACP,0,szPath,-1,lpszPath,MAX_PATH,0,0);
|
||||
}
|
||||
return bRet;
|
||||
}
|
||||
@ -3475,7 +3475,7 @@ VOID WINAPI PathSetDlgItemPathA(HWND hDlg, int id, LPCSTR lpszPath)
|
||||
TRACE("(%p,%8x,%s)\n",hDlg, id, debugstr_a(lpszPath));
|
||||
|
||||
if (lpszPath)
|
||||
MultiByteToWideChar(0,0,lpszPath,-1,szPath,MAX_PATH);
|
||||
MultiByteToWideChar(CP_ACP,0,lpszPath,-1,szPath,MAX_PATH);
|
||||
else
|
||||
szPath[0] = '\0';
|
||||
PathSetDlgItemPathW(hDlg, id, szPath);
|
||||
@ -3679,7 +3679,7 @@ BOOL WINAPI PathIsDirectoryEmptyA(LPCSTR lpszPath)
|
||||
if (lpszPath)
|
||||
{
|
||||
WCHAR szPath[MAX_PATH];
|
||||
MultiByteToWideChar(0,0,lpszPath,-1,szPath,MAX_PATH);
|
||||
MultiByteToWideChar(CP_ACP,0,lpszPath,-1,szPath,MAX_PATH);
|
||||
bRet = PathIsDirectoryEmptyW(szPath);
|
||||
}
|
||||
return bRet;
|
||||
@ -3896,10 +3896,10 @@ HRESULT WINAPI SHGetWebFolderFilePathA(LPCSTR lpszFile, LPSTR lpszPath, DWORD dw
|
||||
|
||||
TRACE("(%s,%p,%ld)\n", lpszFile, lpszPath, dwPathLen);
|
||||
|
||||
MultiByteToWideChar(0, 0, lpszFile, -1, szFile, MAX_PATH);
|
||||
MultiByteToWideChar(CP_ACP, 0, lpszFile, -1, szFile, MAX_PATH);
|
||||
szPath[0] = '\0';
|
||||
hRet = SHGetWebFolderFilePathW(szFile, szPath, dwPathLen);
|
||||
WideCharToMultiByte(0, 0, szPath, -1, lpszPath, dwPathLen, 0, 0);
|
||||
WideCharToMultiByte(CP_ACP, 0, szPath, -1, lpszPath, dwPathLen, 0, 0);
|
||||
return hRet;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user