Alexandre Julliard : shell32/tests: Revive the test for CSIDL_SYSTEMX86.
Alexandre Julliard
julliard at winehq.org
Tue Jul 7 08:08:19 CDT 2009
Module: wine
Branch: master
Commit: 7af70c2c9736883348c7a490d9e18beb131fe6c6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7af70c2c9736883348c7a490d9e18beb131fe6c6
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Jul 7 11:48:25 2009 +0200
shell32/tests: Revive the test for CSIDL_SYSTEMX86.
---
dlls/shell32/tests/shellpath.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c
index 4cacb08..b5b1967 100644
--- a/dlls/shell32/tests/shellpath.c
+++ b/dlls/shell32/tests/shellpath.c
@@ -89,6 +89,7 @@ static HRESULT (WINAPI *pSHGetSpecialFolderLocation)(HWND, int, LPITEMIDLIST *);
static LPITEMIDLIST (WINAPI *pILFindLastID)(LPCITEMIDLIST);
static int (WINAPI *pSHFileOperationA)(LPSHFILEOPSTRUCTA);
static HRESULT (WINAPI *pSHGetMalloc)(LPMALLOC *);
+static UINT (WINAPI *pGetSystemWow64DirectoryA)(LPSTR,UINT);
static DLLVERSIONINFO shellVersion = { 0 };
static LPMALLOC pMalloc;
static const BYTE guidType[] = { PT_GUID };
@@ -684,10 +685,17 @@ static void testSystemDir(void)
"GetSystemDirectory returns %s SHGetSpecialFolderPath returns %s\n",
systemDir, systemShellPath);
}
- /* CSIDL_SYSTEMX86 isn't checked in the same way, since it's different
- * on Win64 (and non-x86 Windows systems, if there are any still in
- * existence) than on Win32.
- */
+
+ if (!pGetSystemWow64DirectoryA || !pGetSystemWow64DirectoryA(systemDir, sizeof(systemDir)))
+ GetSystemDirectoryA(systemDir, sizeof(systemDir));
+ myPathRemoveBackslashA(systemDir);
+ if (pSHGetSpecialFolderPathA(NULL, systemShellPath, CSIDL_SYSTEMX86, FALSE))
+ {
+ myPathRemoveBackslashA(systemShellPath);
+ ok(!lstrcmpiA(systemDir, systemShellPath),
+ "GetSystemDirectory returns %s SHGetSpecialFolderPath returns %s\n",
+ systemDir, systemShellPath);
+ }
}
/* Globals used by subprocesses */
@@ -871,6 +879,8 @@ START_TEST(shellpath)
if (!init()) return;
loadShell32();
+ pGetSystemWow64DirectoryA = (void *)GetProcAddress( GetModuleHandleA("kernel32.dll"),
+ "GetSystemWow64DirectoryA" );
if (myARGC >= 3)
doChild(myARGV[2]);
More information about the wine-cvs
mailing list