Mariusz Pluciński : shell32: Add support of parent folder to RegisterFolder.

Alexandre Julliard julliard at winehq.org
Wed Jun 29 15:47:44 CDT 2011


Module: wine
Branch: master
Commit: 06f706a068c8fc1a41755004ee296aab886f2eda
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=06f706a068c8fc1a41755004ee296aab886f2eda

Author: Mariusz Pluciński <vshader at gmail.com>
Date:   Wed Jun 29 19:34:44 2011 +0200

shell32: Add support of parent folder to RegisterFolder.

---

 dlls/shell32/shellpath.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
index aed7ceb..33c9908 100644
--- a/dlls/shell32/shellpath.c
+++ b/dlls/shell32/shellpath.c
@@ -3080,6 +3080,7 @@ HRESULT WINAPI SHGetFolderPathEx(REFKNOWNFOLDERID rfid, DWORD flags, HANDLE toke
 static const WCHAR szCategory[] = {'C','a','t','e','g','o','r','y',0};
 static const WCHAR szName[] = {'N','a','m','e',0};
 static const WCHAR szRelativePath[] = {'R','e','l','a','t','i','v','e','P','a','t','h',0};
+static const WCHAR szParentFolder[] = {'P','a','r','e','n','t','F','o','l','d','e','r',0};
 
 /*
  * Internal function to convert known folder identifier to path of registry key
@@ -3566,6 +3567,15 @@ static HRESULT WINAPI foldermanager_RegisterFolder(
         if(SUCCEEDED(hr))
             hr = HRESULT_FROM_WIN32(RegSetValueExW(hKey, szName, 0, REG_SZ, (LPBYTE)pKFD->pszName, (lstrlenW(pKFD->pszName)+1)*sizeof(WCHAR) ));
 
+        if(SUCCEEDED(hr) && !IsEqualGUID(&pKFD->fidParent, &GUID_NULL))
+        {
+            WCHAR sParentGuid[39];
+            StringFromGUID2(&pKFD->fidParent, sParentGuid, sizeof(sParentGuid)/sizeof(sParentGuid[0]));
+
+            /* this known folder has parent folder */
+            hr = HRESULT_FROM_WIN32(RegSetValueExW(hKey, szParentFolder, 0, REG_SZ, (LPBYTE)sParentGuid, sizeof(sParentGuid)));
+        }
+
         if(SUCCEEDED(hr) && pKFD->category != KF_CATEGORY_VIRTUAL)
             hr = HRESULT_FROM_WIN32(RegSetValueExW(hKey, szRelativePath, 0, REG_SZ, (LPBYTE)pKFD->pszRelativePath, (lstrlenW(pKFD->pszRelativePath)+1)*sizeof(WCHAR) ));
 




More information about the wine-cvs mailing list