Hans Leidekker : shell32: Fix definitions for FOLDERID_ProgramFilesX64 and FOLDERID_ProgramFilesCommonX64 on 64-bit.
Alexandre Julliard
julliard at winehq.org
Thu Nov 14 15:51:28 CST 2019
Module: wine
Branch: master
Commit: 3ca6b296dac2856e0280503d0cdd40b9b4e4e7b2
URL: https://source.winehq.org/git/wine.git/?a=commit;h=3ca6b296dac2856e0280503d0cdd40b9b4e4e7b2
Author: Hans Leidekker <hans at codeweavers.com>
Date: Thu Nov 14 13:24:09 2019 +0100
shell32: Fix definitions for FOLDERID_ProgramFilesX64 and FOLDERID_ProgramFilesCommonX64 on 64-bit.
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/shell32/shellpath.c | 12 ++++++++++++
dlls/shell32/tests/shellpath.c | 22 ++++++++++++++++++++++
2 files changed, 34 insertions(+)
diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
index 8c6e8a89b2..d9d65cbaed 100644
--- a/dlls/shell32/shellpath.c
+++ b/dlls/shell32/shellpath.c
@@ -2697,9 +2697,15 @@ static const CSIDL_DATA CSIDL_Data[] =
},
{ /* 0x54 */
&FOLDERID_ProgramFilesX64,
+#ifdef _WIN64
+ CSIDL_Type_CurrVer,
+ ProgramFilesDirW,
+ Program_FilesW,
+#else
CSIDL_Type_NonExistent,
NULL,
NULL,
+#endif
KF_CATEGORY_FIXED, /* category */
ProgramFilesX64W, /* name */
@@ -2717,9 +2723,15 @@ static const CSIDL_DATA CSIDL_Data[] =
},
{ /* 0x55 */
&FOLDERID_ProgramFilesCommonX64,
+#ifdef _WIN64
+ CSIDL_Type_CurrVer,
+ ProgramFilesCommonX64W,
+ Program_Files_Common_FilesW,
+#else
CSIDL_Type_NonExistent,
NULL,
NULL,
+#endif
KF_CATEGORY_FIXED, /* category */
ProgramFilesCommonX64W, /* name */
diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c
index f768f44c8b..262714a9f3 100644
--- a/dlls/shell32/tests/shellpath.c
+++ b/dlls/shell32/tests/shellpath.c
@@ -1932,6 +1932,28 @@ if (0) { /* crashes */
hr = pSHGetFolderPathEx(&FOLDERID_Desktop, 0, NULL, buffer, len + 1);
ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr);
+
+ path = NULL;
+ hr = pSHGetKnownFolderPath(&FOLDERID_ProgramFilesX64, 0, NULL, &path);
+#ifdef _WIN64
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(path != NULL, "path not set\n");
+ CoTaskMemFree(path);
+#else
+ todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr);
+ ok(path == NULL, "path set\n");
+#endif
+
+ path = NULL;
+ hr = pSHGetKnownFolderPath(&FOLDERID_ProgramFilesCommonX64, 0, NULL, &path);
+#ifdef _WIN64
+ ok(hr == S_OK, "expected S_OK, got 0x%08x\n", hr);
+ ok(path != NULL, "path not set\n");
+ CoTaskMemFree(path);
+#else
+ todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr);
+ ok(path == NULL, "path set\n");
+#endif
}
static BOOL is_in_strarray(const WCHAR *needle, const char *hay)
More information about the wine-cvs
mailing list