Module: wine Branch: master Commit: 0c78cfce976bc14145f56cb61f72ed1a798db42e URL: https://gitlab.winehq.org/wine/wine/-/commit/0c78cfce976bc14145f56cb61f72ed1...
Author: Zhiyi Zhang zzhang@codeweavers.com Date: Fri Aug 12 11:32:54 2022 +0800
user32/tests: Link directly to imm32.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com
---
dlls/user32/tests/Makefile.in | 2 +- dlls/user32/tests/input.c | 12 ++---------- dlls/user32/tests/msg.c | 13 ++----------- 3 files changed, 5 insertions(+), 22 deletions(-)
diff --git a/dlls/user32/tests/Makefile.in b/dlls/user32/tests/Makefile.in index dd101d69f3c..344a3b66d2b 100644 --- a/dlls/user32/tests/Makefile.in +++ b/dlls/user32/tests/Makefile.in @@ -1,5 +1,5 @@ TESTDLL = user32.dll -IMPORTS = user32 gdi32 advapi32 hid +IMPORTS = user32 gdi32 advapi32 hid imm32
C_SRCS = \ broadcast.c \ diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index 0d003c6cc21..f508ed69b74 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -55,6 +55,7 @@ #include "winnls.h" #include "winreg.h" #include "ddk/hidsdi.h" +#include "imm.h"
#include "wine/test.h"
@@ -1188,8 +1189,6 @@ static void test_Input_unicode(void) WNDCLASSW wclass; HANDLE hInstance = GetModuleHandleW(NULL); HHOOK hook; - HMODULE hModuleImm32; - BOOL (WINAPI *pImmDisableIME)(DWORD); BOOL us_kbd = (GetKeyboardLayout(0) == (HKL)(ULONG_PTR)0x04090409); if (!us_kbd) { @@ -1212,14 +1211,7 @@ static void test_Input_unicode(void) return; }
- hModuleImm32 = LoadLibraryA("imm32.dll"); - if (hModuleImm32) { - pImmDisableIME = (void *)GetProcAddress(hModuleImm32, "ImmDisableIME"); - if (pImmDisableIME) - pImmDisableIME(0); - } - pImmDisableIME = NULL; - FreeLibrary(hModuleImm32); + ImmDisableIME(0);
/* create the test window that will receive the keystrokes */ hWndTest = CreateWindowW(wclass.lpszClassName, windowNameW, diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 2705914d5e5..9f8522d4ac8 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -32,6 +32,7 @@ #include "winnls.h" #include "dbt.h" #include "commctrl.h" +#include "imm.h"
#include "wine/test.h"
@@ -18794,8 +18795,6 @@ START_TEST(msg) char **test_argv; BOOL ret; BOOL (WINAPI *pIsWinEventHookInstalled)(DWORD)= 0;/*GetProcAddress(user32, "IsWinEventHookInstalled");*/ - HMODULE hModuleImm32; - BOOL (WINAPI *pImmDisableIME)(DWORD); int argc;
argc = winetest_get_mainargs( &test_argv ); @@ -18810,15 +18809,7 @@ START_TEST(msg)
InitializeCriticalSection( &sequence_cs ); init_procs(); - - hModuleImm32 = LoadLibraryA("imm32.dll"); - if (hModuleImm32) { - pImmDisableIME = (void *)GetProcAddress(hModuleImm32, "ImmDisableIME"); - if (pImmDisableIME) - pImmDisableIME(0); - } - pImmDisableIME = NULL; - FreeLibrary(hModuleImm32); + ImmDisableIME(0);
if (!RegisterWindowClasses()) assert(0);