Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
67cfcfb9
Commit
67cfcfb9
authored
20 years ago
by
Michael McCormack
Committed by
Alexandre Julliard
20 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use the ACP define in MB/WC conversion functions.
parent
28a8caca
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/shlwapi/path.c
+23
-23
23 additions, 23 deletions
dlls/shlwapi/path.c
with
23 additions
and
23 deletions
dlls/shlwapi/path.c
+
23
−
23
View file @
67cfcfb9
...
...
@@ -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
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment