Mariusz Pluciński : shell32: Add IKnownFolderManager:: UnregisterFolder implementation.
Alexandre Julliard
julliard at winehq.org
Wed Jun 22 11:48:43 CDT 2011
Module: wine
Branch: master
Commit: c5bf1977f2aecda8ebfdcac6b8fa144879c84240
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c5bf1977f2aecda8ebfdcac6b8fa144879c84240
Author: Mariusz Pluciński <vshader at gmail.com>
Date: Wed Jun 22 15:10:02 2011 +0200
shell32: Add IKnownFolderManager::UnregisterFolder implementation.
---
dlls/shell32/shellpath.c | 13 +++++++++++--
dlls/shell32/tests/shellpath.c | 1 -
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
index f602092..0514647 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 c4a268c..104e7d7 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);
}
}
More information about the wine-cvs
mailing list