[PATCH 5/5] comctl32/tests: Reload library before starting version 6 tests
Nikolay Sivov
nsivov at codeweavers.com
Thu Jan 25 08:23:18 CST 2018
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/comctl32/tests/treeview.c | 10 ----------
dlls/comctl32/tests/v6util.h | 6 ++++++
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c
index 51404af089..e4abc4a621 100644
--- a/dlls/comctl32/tests/treeview.c
+++ b/dlls/comctl32/tests/treeview.c
@@ -1342,9 +1342,6 @@ static LRESULT CALLBACK parent_wnd_proc(HWND hWnd, UINT message, WPARAM wParam,
break;
}
- case WM_DESTROY:
- PostQuitMessage(0);
- break;
}
defwndproc_counter++;
@@ -2760,11 +2757,4 @@ START_TEST(treeview)
test_WM_GETDLGCODE();
unload_v6_module(ctx_cookie, hCtx);
-
- PostMessageA(hMainWnd, WM_CLOSE, 0, 0);
- while(GetMessageA(&msg, 0, 0, 0))
- {
- TranslateMessage(&msg);
- DispatchMessageA(&msg);
- }
}
diff --git a/dlls/comctl32/tests/v6util.h b/dlls/comctl32/tests/v6util.h
index b78290a50a..626f6e6125 100644
--- a/dlls/comctl32/tests/v6util.h
+++ b/dlls/comctl32/tests/v6util.h
@@ -70,6 +70,7 @@ static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx)
{
ACTCTX_SECTION_KEYED_DATA data;
DWORD written;
+ HMODULE hmod;
ACTCTXA ctx;
HANDLE file;
BOOL ret;
@@ -103,6 +104,8 @@ static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx)
*hCtx = CreateActCtxA(&ctx);
ok(*hCtx != 0, "Expected context handle\n");
+ hmod = GetModuleHandleA("comctl32.dll");
+
ret = ActivateActCtx(*hCtx, pcookie);
ok(ret, "Failed to activate context, error %d.\n", GetLastError());
@@ -117,7 +120,10 @@ static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx)
"comctl32.dll", &data);
ok(ret, "failed to find comctl32.dll in active context, %u\n", GetLastError());
if (ret)
+ {
+ FreeLibrary(hmod);
LoadLibraryA("comctl32.dll");
+ }
return ret;
}
--
2.15.1
More information about the wine-devel
mailing list