Nikolay Sivov : comctl32/tests: Reload library before starting version 6 tests.
Alexandre Julliard
julliard at winehq.org
Thu Jan 25 17:37:41 CST 2018
Module: wine
Branch: master
Commit: f54a6617673d8fea6c2a3a2fa805fa906de82198
URL: https://source.winehq.org/git/wine.git/?a=commit;h=f54a6617673d8fea6c2a3a2fa805fa906de82198
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Thu Jan 25 17:23:18 2018 +0300
comctl32/tests: Reload library before starting version 6 tests.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/comctl32/tests/treeview.c | 11 -----------
dlls/comctl32/tests/v6util.h | 6 ++++++
2 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c
index 51404af..64fb1eb 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++;
@@ -2682,7 +2679,6 @@ START_TEST(treeview)
ULONG_PTR ctx_cookie;
HANDLE hCtx;
WNDCLASSA wc;
- MSG msg;
init_functions();
@@ -2760,11 +2756,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 b78290a..626f6e6 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;
}
More information about the wine-cvs
mailing list