https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c00bafaad97edc72e15c3…
commit c00bafaad97edc72e15c38b30b722649b81896eb
Author: Bișoc George <fraizeraust99(a)gmail.com>
AuthorDate: Fri Nov 16 23:09:15 2018 +0100
Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org>
CommitDate: Fri Nov 16 23:09:15 2018 +0100
[SHELL32] Print out the error code (#973)
When SearchPathW, GetFullPathNameW and PathFileExistsW fail, output the error code.
---
dll/win32/shell32/CShellLink.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dll/win32/shell32/CShellLink.cpp b/dll/win32/shell32/CShellLink.cpp
index fa1adab35f..7b402eb186 100644
--- a/dll/win32/shell32/CShellLink.cpp
+++ b/dll/win32/shell32/CShellLink.cpp
@@ -2213,7 +2213,7 @@ static BOOL HACKISH_PathResolve(
_countof(szPath), szPath, NULL) != 0);
if (!Success)
{
- ERR("SearchPathW(pszPath = '%S') failed\n", pszPath);
+ ERR("SearchPathW(pszPath = '%S') failed. Error code:
%lu\n", pszPath, GetLastError());
}
else
{
@@ -2224,7 +2224,7 @@ static BOOL HACKISH_PathResolve(
if (!Success)
{
- ERR("SearchPathW(pszPath = '%S') failed\n", pszPath);
+ ERR("SearchPathW(pszPath = '%S') failed. Error code: %lu\n",
pszPath, GetLastError());
/* We failed, try with PathFindOnPath, as explained by MSDN */
// Success = PathFindOnPathW(pszPath, dirs);
@@ -2237,13 +2237,13 @@ static BOOL HACKISH_PathResolve(
/* We failed again, fall back to building a possible non-existing path */
if (!GetFullPathNameW(pszPath, _countof(szPath), szPath, &fname))
{
- ERR("GetFullPathNameW(pszPath = '%S') failed\n",
pszPath);
+ ERR("GetFullPathNameW(pszPath = '%S') failed. Error code:
%lu\n", pszPath, GetLastError());
return FALSE;
}
Success = PathFileExistsW(szPath);
if (!Success)
- ERR("PathFileExistsW(szPath = '%S') failed\n",
szPath);
+ ERR("PathFileExistsW(szPath = '%S') failed. Error code:
%lu\n", szPath, GetLastError());
/******************************************************/
/* Question: Why this line is needed only for files?? */