Austin Lund : user32/tests: Fix test failures by disabling IME when testing unicode input.

Alexandre Julliard julliard at winehq.org
Mon Nov 29 13:38:45 CST 2010


Module: wine
Branch: master
Commit: c82aa505e914020136c75191331a4d5723f1219d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c82aa505e914020136c75191331a4d5723f1219d

Author: Austin Lund <austin.lund at gmail.com>
Date:   Mon Nov 29 15:59:00 2010 +1000

user32/tests: Fix test failures by disabling IME when testing unicode input.

---

 dlls/user32/tests/input.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index 5a7c2db..9eb72c5 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -1139,6 +1139,8 @@ static void test_Input_unicode(void)
     WNDCLASSW wclass;
     HANDLE hInstance = GetModuleHandleW(NULL);
     HHOOK hook;
+    HMODULE hModuleImm32;
+    BOOL (WINAPI *pImmDisableIME)(DWORD);
 
     wclass.lpszClassName = classNameW;
     wclass.style         = CS_HREDRAW | CS_VREDRAW;
@@ -1154,6 +1156,16 @@ static void test_Input_unicode(void)
         win_skip("Unicode functions not supported\n");
         return;
     }
+
+    hModuleImm32 = LoadLibrary("imm32.dll");
+    if (hModuleImm32) {
+        pImmDisableIME = (void *)GetProcAddress(hModuleImm32, "ImmDisableIME");
+        if (pImmDisableIME)
+            pImmDisableIME(0);
+    }
+    pImmDisableIME = NULL;
+    FreeLibrary(hModuleImm32);
+
     /* create the test window that will receive the keystrokes */
     hWndTest = CreateWindowW(wclass.lpszClassName, windowNameW,
                              WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, 100, 100,




More information about the wine-cvs mailing list