[PATCH 2/5] shell32: Also return ParentFolder ID in GetFolderDefinition

Andrew Eikum aeikum at codeweavers.com
Mon Mar 2 09:28:36 CST 2015


---
 dlls/shell32/shellpath.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
index 6f47468..8724158 100644
--- a/dlls/shell32/shellpath.c
+++ b/dlls/shell32/shellpath.c
@@ -3683,6 +3683,8 @@ static HRESULT WINAPI knownfolder_GetFolderDefinition(
 {
     struct knownfolder *knownfolder = impl_from_IKnownFolder( iface );
     HRESULT hr;
+    DWORD dwSize;
+    WCHAR parentGuid[39];
     TRACE("(%p, %p)\n", knownfolder, pKFD);
 
     if(!pKFD) return E_INVALIDARG;
@@ -3699,6 +3701,12 @@ static HRESULT WINAPI knownfolder_GetFolderDefinition(
         return hr;
 
     /* optional fields */
+    dwSize = sizeof(parentGuid);
+    hr = HRESULT_FROM_WIN32(RegGetValueW(HKEY_LOCAL_MACHINE, knownfolder->registryPath, szParentFolder,
+                RRF_RT_REG_SZ, NULL, parentGuid, &dwSize));
+    if(SUCCEEDED(hr))
+        IIDFromString(parentGuid, &pKFD->fidParent);
+
     get_known_folder_dword(knownfolder->registryPath, szAttributes, &pKFD->dwAttributes);
 
     return S_OK;
-- 
2.3.1





More information about the wine-patches mailing list