_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
{
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);
/* 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?? */