diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index f602092684e..0514647031f 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -3477,8 +3477,17 @@ static HRESULT WINAPI foldermanager_UnregisterFolder( IKnownFolderManager *iface, REFKNOWNFOLDERID rfid) { - FIXME("%p\n", rfid); - return E_NOTIMPL; + HRESULT hr; + LPWSTR registryPath = NULL; + TRACE("(%p, %s)\n", iface, debugstr_guid(rfid)); + + hr = get_known_folder_registry_path(rfid, ®istryPath); + + if(SUCCEEDED(hr)) + hr = HRESULT_FROM_WIN32(RegDeleteKeyW(HKEY_LOCAL_MACHINE, registryPath)); + + HeapFree(GetProcessHeap(), 0, registryPath); + return hr; } static HRESULT WINAPI foldermanager_FindFolderFromPath( diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index c4a268c89ec..104e7d7ae84 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -1242,7 +1242,6 @@ static void test_knownFolders(void) } hr = IKnownFolderManager_UnregisterFolder(mgr, &newFolderId); - todo_wine ok(hr == S_OK, "failed to unregister folder: 0x%08x\n", hr); } }