[2/2] shell32/tests: Destroy shell view windows.

Thomas Faber thomas.faber at reactos.org
Thu Jul 2 05:36:47 CDT 2015


When calling IShellView::CreateViewWindow, the window itself takes
references to the shell view and related objects (e.g. for a drop
target). This means just calling IShellView::Release is not enough to
properly clean up, the window needs to be destroyed as well.
-------------- next part --------------
From 318b27a85cac106a1436d2e128b49ca55e69d900 Mon Sep 17 00:00:00 2001
From: Thomas Faber <thomas.faber at reactos.org>
Date: Thu, 2 Jul 2015 06:25:46 -0400
Subject: shell32/tests: Destroy shell view windows.

---
 dlls/shell32/tests/shlview.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/dlls/shell32/tests/shlview.c b/dlls/shell32/tests/shlview.c
index 1cfffaa..2134a49 100644
--- a/dlls/shell32/tests/shlview.c
+++ b/dlls/shell32/tests/shlview.c
@@ -676,6 +676,10 @@ if (0)
     ok(hr == S_OK, "got (0x%08x)\n", hr);
     IDropTarget_Release(dt);
 
+    hr = IShellView_DestroyViewWindow(view);
+    ok(hr == S_OK, "got (0x%08x)\n", hr);
+    ok(!IsWindow(hwnd_view), "hwnd %p still valid\n", hwnd_view);
+
     IShellView_Release(view);
     IShellFolder_Release(desktop);
 }
@@ -835,6 +839,10 @@ if (0)
         win_skip("IFolderView2 is not supported.\n");
     if (fv2) IFolderView2_Release(fv2);
 
+    hr = IShellView_DestroyViewWindow(view);
+    ok(hr == S_OK, "got (0x%08x)\n", hr);
+    ok(!IsWindow(hwnd_view), "hwnd %p still valid\n", hwnd_view);
+
     IShellBrowser_Release(browser);
     IFolderView_Release(fv);
     IShellView_Release(view);
-- 
1.7.1



More information about the wine-patches mailing list