Module: wine Branch: master Commit: 32a6ee38874e11805b0d5fcfe167ba9931d3696c URL: http://source.winehq.org/git/wine.git/?a=commit;h=32a6ee38874e11805b0d5fcfe1... Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Mon Mar 2 09:28:36 2015 -0600 shell32: Also return ParentFolder ID in GetFolderDefinition. --- dlls/shell32/shellpath.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index d33091d..8724158 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -3683,12 +3683,15 @@ 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; ZeroMemory(pKFD, sizeof(*pKFD)); + /* required fields */ hr = get_known_folder_dword(knownfolder->registryPath, szCategory, &pKFD->category); if(FAILED(hr)) return hr; @@ -3697,6 +3700,15 @@ static HRESULT WINAPI knownfolder_GetFolderDefinition( if(FAILED(hr)) 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; }