user32/tests: Link directly to imm32.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
This commit is contained in:
Zhiyi Zhang 2022-08-12 11:32:54 +08:00 committed by Alexandre Julliard
parent 2a5cf1b62a
commit 0c78cfce97
3 changed files with 5 additions and 22 deletions

View file

@ -1,5 +1,5 @@
TESTDLL = user32.dll
IMPORTS = user32 gdi32 advapi32 hid
IMPORTS = user32 gdi32 advapi32 hid imm32
C_SRCS = \
broadcast.c \

View file

@ -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,

View file

@ -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);