Michael Jung : shell32/tests: Fixed a test failing on WinXP.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Dec 20 04:56:30 CST 2005


Module: wine
Branch: refs/heads/master
Commit: 9a0369449e4a8f764103298b463a160108f41baa
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=9a0369449e4a8f764103298b463a160108f41baa

Author: Michael Jung <mjung at iss.tu-darmstadt.de>
Date:   Tue Dec 20 11:57:44 2005 +0100

shell32/tests: Fixed a test failing on WinXP.

---

 dlls/shell32/tests/shlfolder.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c
index 2a09ea6..8c0d7f7 100644
--- a/dlls/shell32/tests/shlfolder.c
+++ b/dlls/shell32/tests/shlfolder.c
@@ -905,9 +905,18 @@ void test_FolderShortcut(void) {
     BOOL result;
     CLSID clsid;
     LPITEMIDLIST pidlCurrentFolder, pidlWineTestFolder, pidlSubFolder;
+    HKEY hShellExtKey;
     WCHAR wszWineTestFolder[] = {
         ':',':','{','9','B','3','5','2','E','B','F','-','2','7','6','5','-','4','5','C','1','-',
         'B','4','C','6','-','8','5','C','C','7','F','7','A','B','C','6','4','}',0 };
+    WCHAR wszShellExtKey[] = { 'S','o','f','t','w','a','r','e','\\',
+        'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\',
+        'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
+        'E','x','p','l','o','r','e','r','\\','D','e','s','k','t','o','p','\\',
+        'N','a','m','e','S','p','a','c','e','\\',
+        '{','9','b','3','5','2','e','b','f','-','2','7','6','5','-','4','5','c','1','-',
+        'b','4','c','6','-','8','5','c','c','7','f','7','a','b','c','6','4','}',0 };
+    
     WCHAR wszSomeSubFolder[] = { 'S','u','b','F','o','l','d','e','r', 0};
     static const GUID CLSID_UnixDosFolder = 
         {0x9d20aae8, 0x0625, 0x44b0, {0x9c, 0xa7, 0x71, 0x88, 0x9c, 0x22, 0x54, 0xd9}};
@@ -973,8 +982,13 @@ void test_FolderShortcut(void) {
     ok (SUCCEEDED(hr), "SHGetDesktopFolder failed! hr = %08lx\n", hr);
     if (FAILED(hr)) return;
 
+    /* Temporarily register WineTestFolder as a shell namespace extension at the Desktop. 
+     * Otherwise ParseDisplayName fails on WinXP with E_INVALIDARG */
+    RegCreateKeyW(HKEY_CURRENT_USER, wszShellExtKey, &hShellExtKey);
+    RegCloseKey(hShellExtKey);
     hr = IShellFolder_ParseDisplayName(pDesktopFolder, NULL, NULL, wszWineTestFolder, NULL,
                                        &pidlWineTestFolder, NULL);
+    RegDeleteKeyW(HKEY_CURRENT_USER, wszShellExtKey);
     IShellFolder_Release(pDesktopFolder);
     ok (SUCCEEDED(hr), "IShellFolder::ParseDisplayName failed! hr = %08lx\n", hr);
     if (FAILED(hr)) return;




More information about the wine-cvs mailing list