132 fprintf(
stdout,
"%s:%d: msg_spy: message buffer overflow!\n",
167 if (
msg_spy.call_wnd_proc_hook)
176static const char wndcls[] =
"winetest_imm32_wndcls";
185 HWND default_ime_wnd;
195 ok(!default_ime_wnd,
"expected no IME windows\n");
198 ok(default_ime_wnd !=
NULL,
"expected IME window existence\n");
212 ok(default_ime_wnd !=
NULL,
"expected IME window existence\n");
215 ok(!default_ime_wnd,
"expected no IME windows\n");
227 ok(default_ime_wnd !=
NULL,
"expected IME window existence\n");
230 ok(!default_ime_wnd,
"expected no IME windows\n");
279 win_skip(
"IME support not implemented\n");
301 static char string[] =
"wine";
303 static const char string[] =
"wine";
305 char resstr[16] =
"";
315 "Canceling an empty composition string should succeed.\n");
317 "WM_IME_COMPOSITION in response to NI_COMPOSITIONSTR / CPS_CANCEL, if "
318 "the composition string being canceled is empty.\n");
328 ok(!
ret,
"After being cancelled the composition string is empty.\n");
335 "Canceling an empty composition string should succeed.\n");
337 "WM_IME_COMPOSITION in response to NI_COMPOSITIONSTR / CPS_CANCEL, if "
338 "the composition string being canceled is empty.\n");
348 ok (
ret == 0,
"Bad IME should return 0\n");
353 ok (
ret == 0,
"NULL IME should return 0\n");
358 ok (
ret == 0,
"Destroyed IME should return 0\n");
376 case WM_IME_COMPOSITION:
385 ok(hwndIme !=
NULL,
"expected IME window existence\n");
398 wstring,
sizeof(wstring));
399 ok(
size > 0,
"ImmGetCompositionString(GCS_RESULTSTR) is %d\n",
size);
434 static WCHAR string[] = {
'w',
'i',
'n',
'e',0x65e5,0x672c,0x8a9e};
436 static const WCHAR string[] = {
'w',
'i',
'n',
'e',0x65e5,0x672c,0x8a9e};
448 win_skip(
"Composition isn't supported\n");
460 ok(
len*
sizeof(
WCHAR)==wlen,
"GCS_COMPATTR(W) not returning correct count\n");
462 ok(
len==alen,
"GCS_COMPATTR(A) not returning correct count\n");
465 memset(wstring, 0x1a,
sizeof(wstring));
466 memset(cstring, 0x1a,
sizeof(cstring));
469 ok(
len == alen,
"Unexpected length %d.\n",
len);
470 ok(cstring[alen] == 0x1a,
"Unexpected buffer contents.\n");
473 ok(
len == wlen,
"Unexpected length %d.\n",
len);
474 ok(wstring[wlen/
sizeof(
WCHAR)] == 0x1a1a,
"Unexpected buffer contents.\n");
477 memset(wstring, 0x1a,
sizeof(wstring));
478 memset(cstring, 0x1a,
sizeof(cstring));
482 ok(!
len,
"Unexpected length %d.\n",
len);
483 ok(cstring[0] ==
'w',
"Unexpected buffer contents %s.\n", cstring);
486 ok(
len == wlen - 1,
"Unexpected length %d.\n",
len);
487 ok(!
memcmp(wstring,
string, wlen - 1),
"Unexpected buffer contents.\n");
490 memset(wstring, 0x1a,
sizeof(wstring));
491 memset(cstring, 0x1a,
sizeof(cstring));
494 ok(
len == alen,
"Unexpected length %d.\n",
len);
495 ok(cstring[0] == 0x1a,
"Unexpected buffer contents %s.\n", cstring);
498 ok(
len == wlen,
"Unexpected length %d.\n",
len);
499 ok(wstring[0] == 0x1a1a,
"Unexpected buffer contents.\n");
502 win_skip(
"Composition string isn't available\n");
510 skip(
"This IME doesn't support SCS_SETSTR\n");
520 string,
sizeof(
string),
NULL,0);
521 ok(
ret,
"ImmSetCompositionStringW failed\n");
523 wstring,
sizeof(wstring));
526 ok(
ret,
"ImmNotifyIME(CPS_COMPLETE) failed\n");
529 "WM_IME_COMPOSITION(GCS_RESULTSTR) isn't sent\n");
532 win_skip(
"Composition string isn't available\n");
544 const DWORD MY_TIMER = 0xcaffe;
547 "IME composition test",
552 "Input a DBCS character here using IME.",
573 skip(
"WM_IME_COMPOSITION(GCS_RESULTSTR) isn't tested\n");
585 ok(imc != 0,
"ImmGetContext() failed. Last error: %u\n",
GetLastError());
592 "ImmSetCompositionStringW() failed.\n");
596 ok(!
ret,
"ImmSetCompositionStringW() succeeded.\n");
600 ok(!
ret,
"ImmSetCompositionStringW() succeeded.\n");
604 ok(!
ret,
"ImmSetCompositionStringW() succeeded.\n");
608 ok(!
ret,
"ImmSetCompositionStringW() succeeded.\n");
626 ok (rc == 0,
"ImmConfigureIMEA did not fail\n");
632 ok (rc == 0,
"ImmConfigureIMEW did not fail\n");
642 if (!pImmAssociateContextEx)
return;
650 ok(newimc != imc,
"handles should not be the same\n");
651 rc = pImmAssociateContextEx(
NULL,
NULL, 0);
652 ok(!rc,
"ImmAssociateContextEx succeeded\n");
653 rc = pImmAssociateContextEx(
hwnd,
NULL, 0);
654 ok(rc,
"ImmAssociateContextEx failed\n");
655 rc = pImmAssociateContextEx(
NULL, imc, 0);
656 ok(!rc,
"ImmAssociateContextEx succeeded\n");
658 rc = pImmAssociateContextEx(
hwnd, imc, 0);
659 ok(rc,
"ImmAssociateContextEx failed\n");
661 ok(retimc == imc,
"handles should be the same\n");
664 rc = pImmAssociateContextEx(
hwnd, newimc, 0);
665 ok(rc,
"ImmAssociateContextEx failed\n");
667 ok(retimc == newimc,
"handles should be the same\n");
671 ok(rc,
"ImmAssociateContextEx failed\n");
699 ok(
info->himc == h1,
"hwnd context changed in new thread\n");
701 ok(h2 != h1,
"new hwnd in new thread should have different context\n");
710 ok(h1 == h2,
"Windows in same thread should have same default context\n");
738 HIMC himc, otherHimc, h1;
751 threadinfo.
himc = himc;
757 ok(himc != otherHimc,
"Windows from other threads should have different himc\n");
758 ok(otherHimc == threadinfo.
himc,
"Context from other thread should not change in main thread\n");
761 ok(h1 ==
NULL,
"Should fail to be able to Associate a default context from a different thread\n");
763 ok(h1 == himc,
"Context for window should remain unchanged\n");
767 ok (h1 ==
NULL,
"Should fail to associate a context from a different thread\n");
769 ok(h1 == himc,
"Context for window should remain unchanged\n");
773 ok (h1 ==
NULL,
"Should fail to associate a context from a different thread into a window from that thread.\n");
775 ok(h1 == threadinfo.
himc,
"Context for window should remain unchanged\n");
780 ok(rc != 0,
"ImmSetOpenStatus failed\n");
782 ok(rc != 0,
"ImmGetOpenStatus failed\n");
784 ok(rc != 0,
"ImmSetOpenStatus failed\n");
786 ok(rc == 0,
"ImmGetOpenStatus failed\n");
789 ok(rc == 0,
"ImmSetOpenStatus should fail\n");
791 ok(rc == 0,
"ImmSetOpenStatus should fail\n");
793 ok(rc == 0,
"ImmGetOpenStatus failed\n");
795 ok (rc == 1 ||
broken(rc == 0),
"ImmGetOpenStatus should return 1\n");
797 ok(rc == 0,
"ImmSetOpenStatus should fail\n");
799 ok(rc == 0,
"ImmGetOpenStatus failed\n");
803 ok(rc != 0,
"ImmGetCompositionFont failed\n");
805 ok(rc != 0,
"ImmSetCompositionFont failed\n");
808 ok(rc != 0 ||
broken(rc == 0),
"ImmGetCompositionFont failed\n");
810 ok(rc != 0 ||
broken(rc == 0),
"ImmGetCompositionFont user himc failed\n");
812 ok(rc == 0,
"ImmSetCompositionFont should fail\n");
814 ok(rc == 0,
"ImmSetCompositionFont should fail\n");
818 ok(rc != 0,
"ImmSetCompositionWindow failed\n");
820 ok(rc != 0,
"ImmGetCompositionWindow failed\n");
823 ok(rc == 0,
"ImmSetCompositionWindow should fail\n");
825 ok(rc == 0,
"ImmSetCompositionWindow should fail\n");
827 ok(rc != 0 ||
broken(rc == 0),
"ImmGetCompositionWindow failed\n");
829 ok(rc != 0 ||
broken(rc == 0),
"ImmGetCompositionWindow failed\n");
833 ok(rc != 0,
"ImmGetConversionStatus failed\n");
835 ok(rc != 0,
"ImmSetConversionStatus failed\n");
838 ok(rc != 0 ||
broken(rc == 0),
"ImmGetConversionStatus failed\n");
840 ok(rc != 0 ||
broken(rc == 0),
"ImmGetConversionStatus failed\n");
842 ok(rc == 0,
"ImmSetConversionStatus should fail\n");
844 ok(rc == 0,
"ImmSetConversionStatus should fail\n");
848 ok(rc != 0,
"ImmSetStatusWindowPos failed\n");
850 ok(rc != 0,
"ImmGetStatusWindowPos failed\n");
853 ok(rc == 0,
"ImmSetStatusWindowPos should fail\n");
855 ok(rc == 0,
"ImmSetStatusWindowPos should fail\n");
857 ok(rc != 0 ||
broken(rc == 0),
"ImmGetStatusWindowPos failed\n");
859 ok(rc != 0 ||
broken(rc == 0),
"ImmGetStatusWindowPos failed\n");
862 ok (h1 == otherHimc,
"ImmAssociateContext cross thread with NULL should work\n");
864 ok (h1 ==
NULL,
"CrossThread window context should be NULL\n");
866 ok (h1 ==
NULL,
"Resetting cross thread context should fail\n");
868 ok (h1 ==
NULL,
"CrossThread window context should still be NULL\n");
871 ok (rc == 0,
"ImmDestroyContext Cross Thread should fail\n");
875 ok (rc == 0,
"ImmGetCandidateWindow should fail\n");
881 ok (rc == 1,
"ImmSetCandidateWindow should succeed\n");
883 ok (rc == 1,
"ImmGetCandidateWindow should succeed\n");
886 ok (rc == 0,
"ImmGetCandidateWindow should fail\n");
888 ok (rc == 0,
"ImmSetCandidateWindow should fail\n");
890 ok (rc == 1 ||
broken( rc == 0),
"ImmGetCandidateWindow should succeed\n");
892 ok (rc == 0,
"ImmSetCandidateWindow should fail\n");
899 ok(rc == 1,
"PostThreadMessage should succeed\n");
904 ok(himc ==
NULL,
"Should not be able to get himc from other process window\n");
918 { WM_IME_STARTCOMPOSITION,
TRUE },
919 { WM_IME_ENDCOMPOSITION,
TRUE },
920 { WM_IME_COMPOSITION,
TRUE },
945 if (!pImmIsUIMessageA)
return;
951 ok(
ret ==
test->ret,
"ImmIsUIMessageA returned %x for %x\n",
ret,
test->msg);
955 ok(
ret ==
test->ret,
"ImmIsUIMessageA returned %x for %x\n",
ret,
test->msg);
962 ret = pImmIsUIMessageA(
NULL, WM_MSIME_SERVICE, 0, 0);
963 ok(!
ret,
"ImmIsUIMessageA returned TRUE for WM_MSIME_SERVICE\n");
964 ret = pImmIsUIMessageA(
NULL, WM_MSIME_RECONVERTOPTIONS, 0, 0);
965 ok(!
ret,
"ImmIsUIMessageA returned TRUE for WM_MSIME_RECONVERTOPTIONS\n");
966 ret = pImmIsUIMessageA(
NULL, WM_MSIME_MOUSE, 0, 0);
967 ok(!
ret,
"ImmIsUIMessageA returned TRUE for WM_MSIME_MOUSE\n");
968 ret = pImmIsUIMessageA(
NULL, WM_MSIME_RECONVERTREQUEST, 0, 0);
969 ok(!
ret,
"ImmIsUIMessageA returned TRUE for WM_MSIME_RECONVERTREQUEST\n");
970 ret = pImmIsUIMessageA(
NULL, WM_MSIME_RECONVERT, 0, 0);
971 ok(!
ret,
"ImmIsUIMessageA returned TRUE for WM_MSIME_RECONVERT\n");
972 ret = pImmIsUIMessageA(
NULL, WM_MSIME_QUERYPOSITION, 0, 0);
973 ok(!
ret,
"ImmIsUIMessageA returned TRUE for WM_MSIME_QUERYPOSITION\n");
974 ret = pImmIsUIMessageA(
NULL, WM_MSIME_DOCUMENTFEED, 0, 0);
975 ok(!
ret,
"ImmIsUIMessageA returned TRUE for WM_MSIME_DOCUMENTFEED\n");
986 ok(himc ==
NULL,
"ImmGetContext succeeded\n");
990 ok(himc !=
NULL,
"ImmGetContext failed\n");
1003 ok(!
ret,
"ImmGetDescriptionW failed, expected 0 received %d.\n",
ret);
1005 ok(!
ret,
"ImmGetDescriptionA failed, expected 0 received %d.\n",
ret);
1009 ok(
hkl != 0,
"GetKeyboardLayout failed, expected != 0.\n");
1014 win_skip(
"ImmGetDescriptionW is not working for current loaded keyboard.\n");
1020 ok (
ret == 0,
"ImmGetDescriptionW with 0 hkl should return 0\n");
1022 ok (
ret == 0xdeadcafe,
"Last Error should remain unchanged\n");
1025 ok(
ret,
"ImmGetDescriptionW failed, expected != 0 received 0.\n");
1028 ok(lret,
"ImmGetDescriptionW failed, expected != 0 received 0.\n");
1029 ok(lret ==
ret,
"ImmGetDescriptionW failed to return the correct amount of data. Expected %d, got %d.\n",
ret, lret);
1032 ok(lret,
"ImmGetDescriptionA failed, expected != 0 received 0.\n");
1033 ok(lret ==
ret,
"ImmGetDescriptionA failed to return the correct amount of data. Expected %d, got %d.\n",
ret, lret);
1037 ok(lret,
"ImmGetDescriptionW failed, expected != 0 received 0.\n");
1038 ok(lret ==
ret,
"ImmGetDescriptionW failed to return the correct amount of data. Expected %d, got %d.\n",
ret, lret);
1041 ok(!lret,
"ImmGetDescriptionA should fail\n");
1044 ok(!
ret,
"ImmGetDescriptionW failed, expected 0 received %d.\n",
ret);
1059 CreateWindowA(
"static",
"static",
WS_POPUP, 0, 0, 1, 1,
NULL,
NULL,
NULL,
NULL);
1069 HIMC imc1, imc2, imc3;
1085 win_skip(
"IME support not implemented\n");
1104 ok(def3 == def1,
"Default IME window should not change\n");
1105 ok(imc1 == imc3,
"IME context should not change\n");
1122 static const WCHAR imeW[] = {
'I',
'M',
'E',0};
1123 WCHAR class_nameW[16];
1149 HWND hwnd1, hwnd2, default_ime_wnd, ime_wnd;
1166 ok(ime_wnd !=
NULL,
"Expected IME window existence\n");
1168 ok(ime_wnd == default_ime_wnd,
"Expected %p, got %p\n", ime_wnd, default_ime_wnd);
1179 "Expected IME window existence\n");
1181 ok(!
IsWindow(ime_wnd),
"Expected no IME windows\n");
1189 HWND hwnd1, hwnd2, default_ime_wnd, ime_wnd;
1197 ok(hwnd1 ==
NULL,
"creation succeeded, got %p\n", hwnd1);
1205 ok(hwnd1 ==
NULL,
"creation succeeded, got %p\n", hwnd1);
1214 ok(ime_wnd !=
NULL,
"Expected IME window existence\n");
1216 ok(ime_wnd == default_ime_wnd,
"Expected %p, got %p\n", ime_wnd, default_ime_wnd);
1219 ok(!
IsWindow(ime_wnd),
"Expected no IME windows\n");
1235 ok(!default_ime_wnd,
"Expected no IME windows\n");
1242 HWND hwnd1, hwnd2, default_ime_wnd;
1250 ok(!
IsWindow(default_ime_wnd),
"Expected no IME windows, got %p\n", default_ime_wnd);
1257 ok(
IsWindow(default_ime_wnd),
"Expected IME window existence\n");
1267 ok(
IsWindow(default_ime_wnd),
"Expected IME window existence\n");
1270 ok(
IsWindow(default_ime_wnd),
"Expected IME window existence\n");
1332 ok(
count == 0,
"Invalid IMC should return 0\n");
1337 ok(
count == 0,
"NULL IMC should return 0\n");
1339 ok(
ret == 0xdeadbeef,
"Last Error should remain unchanged: %08x\n",
ret);
1341 ok(
count == 0,
"Destroyed IMC should return 0\n");
1349 ok(ic !=
NULL,
"ImmLockIMC failed!\n");
1364 ok(ic !=
NULL,
"ImmLockIMC failed!\n");
1410 ok(
count == g_count,
"count %d, g_count %d\n",
count, g_count);
1436 ok(ic !=
NULL,
"ImmLockIMC failed!\n");
1440 ok(
ret ==
TRUE,
"Destroy a locked IMC should success!\n");
1442 ok(ic ==
NULL,
"Lock a destroyed IMC should fail!\n");
1444 ok(
ret ==
FALSE,
"Unlock a destroyed IMC should fail!\n");
1446 ok(
count == 0,
"Get lock count of a destroyed IMC should return 0!\n");
1449 ok(
ret ==
FALSE,
"Destroy a destroyed IMC should fail!\n");
1464 ok(
p !=
NULL,
"ImmLockIMCC failed!\n");
1470 ok(
p ==
NULL,
"Destroy a locked IMCC should success!\n");
1472 ok(
p ==
NULL,
"Lock a destroyed IMCC should fail!\n");
1474 ok(
ret ==
FALSE,
"Unlock a destroyed IMCC should return FALSE!\n");
1476 ok(
count == 0,
"Get lock count of a destroyed IMCC should return 0!\n");
1478 ok(
size == 0,
"Get size of a destroyed IMCC should return 0!\n");
1481 ok(
p !=
NULL,
"returned NULL\n");
1511 if (
msg)
ok(!
msg->post,
"Message should not be posted\n");
1519 lpTransMsg->
message = WM_IME_STARTCOMPOSITION;
1530 if (
msg)
ok(!
msg->post,
"Message should not be posted\n");
1538 lpTransMsg->
message = WM_IME_COMPOSITION;
1549 if (
msg)
ok(!
msg->post,
"Message should not be posted\n");
1557 lpTransMsg->
message = WM_IME_ENDCOMPOSITION;
1568 if (
msg)
ok(!
msg->post,
"Message should not be posted\n");
1585 WCHAR classNameW[] = {
'P',
'r',
'o',
'c',
'e',
's',
's',
'K',
'e',
'y',
'T',
'e',
's',
't',
'C',
'l',
'a',
's',
's',0};
1586 WCHAR windowNameW[] = {
'P',
'r',
'o',
'c',
'e',
's',
's',
'K',
'e',
'y',0};
1607 win_skip(
"Failed to register window.\n");
1649 inputs[0].
u.
ki.
wVk = 0x41;
1653 pSendInput(1, (
INPUT*)inputs,
sizeof(
INPUT));
1663 trace(
"ProcessKey was correctly found\n");
1669 inputs[0].
u.
ki.
wVk = 0x41;
1673 pSendInput(1, (
INPUT*)inputs,
sizeof(
INPUT));
1696 HIMC imc_null = 0x00000000;
1699 HIMC imc1, imc2, oldimc;
1706 memset(&lf, 0,
sizeof(lf));
1710 ok(
ret ==
TRUE,
"Destroy an IMC should success!\n");
1716 ok(!oldimc,
"Associating to a destroyed imc should fail!\n");
1720 ok(imc1 == imc2,
"imc should not changed! imc1 %p, imc2 %p\n", imc1, imc2);
1724 ok(oldimc !=
NULL,
"Associating to NULL imc should success!\n");
1726 ok(!imc2,
"expect NULL, returned %p\n", imc2);
1728 ok(!oldimc,
"expect NULL, returned %p\n", oldimc);
1730 ok(imc2 == imc1,
"imc should not changed! imc2 %p, imc1 %p\n", imc2, imc1);
1736 ok(!oldimc,
"Associating to a destroyed imc should fail!\n");
1740 ok(imc1 == imc2,
"imc should not changed! imc1 %p, imc2 %p\n", imc1, imc2);
1746 ok(
ret == 0,
"Bad IME should return 0\n");
1751 ok(
ret == 0,
"NULL IME should return 0\n");
1753 ok(
ret == 0xdeadbeef,
"last error should remain unchanged %08x!\n",
ret);
1756 ok(
ret == 0,
"Destroyed IME should return 0\n");
1763 ok(
ret == 0,
"Bad IME should return 0\n");
1768 ok(
ret == 0,
"NULL IME should return 0\n");
1770 ok(
ret == 0xdeadbeef,
"last error should remain unchanged %08x!\n",
ret);
1773 ok(
ret == 0,
"Destroyed IME should return 0\n");
1780 ok(
ret == 0,
"Bad IME should return 0\n");
1785 ok(
ret == 0,
"NULL IME should return 0\n");
1787 ok(
ret == 0xdeadbeef,
"last error should remain unchanged %08x!\n",
ret);
1790 ok(
ret == 0,
"Destroyed IME should return 0\n");
1797 ok(
ret == 0,
"Bad IME should return 0\n");
1802 ok(
ret == 0,
"NULL IME should return 0\n");
1804 ok(
ret == 0xdeadbeef,
"last error should remain unchanged %08x!\n",
ret);
1807 ok(
ret == 0,
"Destroyed IME should return 0\n");
1814 ok(
ret == 0,
"Bad IME should return 0\n");
1819 ok(
ret == 0,
"NULL IME should return 0\n");
1821 ok(
ret == 0xdeadbeef,
"last error should remain unchanged %08x!\n",
ret);
1824 ok(
ret == 0,
"Destroyed IME should return 0\n");
1831 ok(
ret == 0,
"Bad IME should return 0\n");
1836 ok(
ret == 0,
"NULL IME should return 0\n");
1838 ok(
ret == 0xdeadbeef,
"last error should remain unchanged %08x!\n",
ret);
1841 ok(
ret == 0,
"Destroyed IME should return 0\n");
1848 ok(
ret == 0,
"Bad IME should return 0\n");
1853 ok(
ret == 0,
"NULL IME should return 0\n");
1858 ok(
ret == 0,
"Destroyed IME should return 0\n");
1865 ok(
ret == 0,
"Bad IME should return 0\n");
1870 ok(
ret == 0,
"NULL IME should return 0\n");
1872 ok(
ret == 0xdeadbeef,
"last error should remain unchanged %08x!\n",
ret);
1875 ok(
ret == 0,
"Destroyed IME should return 0\n");
1882 ok(
ret == 0,
"Bad IME should return 0\n");
1887 ok(
ret == 0,
"NULL IME should return 0\n");
1889 ok(
ret == 0xdeadbeef,
"last error should remain unchanged %08x!\n",
ret);
1892 ok(
ret == 0,
"Destroyed IME should return 0\n");
1899 ok(
ret == 0,
"Bad IME should return 0\n");
1904 ok(
ret == 0,
"NULL IME should return 0\n");
1909 ok(
ret == 0,
"Destroyed IME should return 0\n");
1916 ok(
ret == 0,
"Bad IME should return 0\n");
1921 ok(
ret == 0,
"NULL IME should return 0\n");
1926 ok(
ret == 0,
"Destroyed IME should return 0\n");
1933 ok(
ret == 0,
"Bad IME should return 0\n");
1938 ok(
ret == 0,
"NULL IME should return 0\n");
1943 ok(
ret == 0,
"Destroyed IME should return 0\n");
1950 ok(
ret == 0,
"Bad IME should return 0\n");
1955 ok(
ret == 0,
"NULL IME should return 0\n");
1960 ok(
ret == 0,
"Destroyed IME should return 0\n");
1967 ok(
ret == 0,
"Bad IME should return 0\n");
1972 ok(
ret == 0,
"NULL IME should return 0\n");
1977 ok(
ret == 0,
"Destroyed IME should return 0\n");
1984 ok(
ret == 0,
"Bad IME should return 0\n");
1989 ok(
ret == 0,
"NULL IME should return 0\n");
1994 ok(
ret == 0,
"Destroyed IME should return 0\n");
2001 ok(ic == 0,
"Bad IME should return 0\n");
2006 ok(ic == 0,
"NULL IME should return 0\n");
2008 ok(
ret == 0xdeadbeef,
"last error should remain unchanged %08x!\n",
ret);
2011 ok(ic == 0,
"Destroyed IME should return 0\n");
2018 ok(
ret == 0,
"Bad IME should return 0\n");
2023 ok(
ret == 0,
"NULL IME should return 0\n");
2025 ok(
ret == 0xdeadbeef,
"last error should remain unchanged %08x!\n",
ret);
2028 ok(
ret == 0,
"Destroyed IME should return 0\n");
2035 ok(
ret == 0,
"Bad IME should return 0\n");
2040 ok(
ret == 0,
"NULL IME should return 0\n");
2045 ok(
ret == 0,
"Destroyed IME should return 0\n");
2076 else win_skip(
"SendInput is not available\n");
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
DWORD WINAPI ImmGetCandidateListCountA(HIMC hIMC, LPDWORD lpdwListCount)
BOOL WINAPI ImmSetCandidateWindow(HIMC hIMC, LPCANDIDATEFORM lpCandidate)
BOOL WINAPI ImmGetCandidateWindow(HIMC hIMC, DWORD dwIndex, LPCANDIDATEFORM lpCandidate)
DWORD WINAPI ImmGetCandidateListA(HIMC hIMC, DWORD dwIndex, LPCANDIDATELIST lpCandList, DWORD dwBufLen)
LONG WINAPI ImmGetCompositionStringW(HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen)
BOOL WINAPI ImmSetCompositionStringA(HIMC hIMC, DWORD dwIndex, LPVOID lpComp, DWORD dwCompLen, LPVOID lpRead, DWORD dwReadLen)
LONG WINAPI ImmGetCompositionStringA(HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen)
BOOL WINAPI ImmSetCompositionStringW(HIMC hIMC, DWORD dwIndex, LPVOID lpComp, DWORD dwCompLen, LPVOID lpRead, DWORD dwReadLen)
#define GetProcAddress(x, y)
#define ERROR_INVALID_HANDLE
BOOL WINAPI ImmGetCompositionWindow(HIMC hIMC, LPCOMPOSITIONFORM lpCompForm)
BOOL WINAPI ImmConfigureIMEA(HKL hKL, HWND hWnd, DWORD dwMode, LPVOID lpData)
BOOL WINAPI ImmGetCompositionFontA(HIMC hIMC, LPLOGFONTA lplf)
HWND WINAPI ImmGetDefaultIMEWnd(HWND hWnd)
BOOL WINAPI ImmSetCompositionFontA(HIMC hIMC, LPLOGFONTA lplf)
UINT WINAPI ImmGetDescriptionA(HKL hKL, LPSTR lpszDescription, UINT uBufLen)
BOOL WINAPI ImmDisableIME(DWORD dwThreadId)
BOOL WINAPI ImmConfigureIMEW(HKL hKL, HWND hWnd, DWORD dwMode, LPVOID lpData)
BOOL WINAPI ImmGetOpenStatus(HIMC hIMC)
BOOL WINAPI ImmSetConversionStatus(HIMC hIMC, DWORD fdwConversion, DWORD fdwSentence)
BOOL WINAPI ImmSetStatusWindowPos(HIMC hIMC, LPPOINT lpptPos)
BOOL WINAPI ImmGetStatusWindowPos(HIMC hIMC, LPPOINT lpptPos)
UINT WINAPI ImmGetDescriptionW(HKL hKL, LPWSTR lpszDescription, UINT uBufLen)
DWORD WINAPI ImmGetImeMenuItemsA(HIMC hIMC, DWORD dwFlags, DWORD dwType, LPIMEMENUITEMINFOA lpImeParentMenu, LPIMEMENUITEMINFOA lpImeMenu, DWORD dwSize)
DWORD WINAPI ImmGetProperty(HKL hKL, DWORD fdwIndex)
BOOL WINAPI ImmNotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue)
BOOL WINAPI ImmGetConversionStatus(HIMC hIMC, LPDWORD lpfdwConversion, LPDWORD lpfdwSentence)
BOOL WINAPI ImmSetOpenStatus(HIMC hIMC, BOOL fOpen)
BOOL WINAPI ImmSetCompositionWindow(HIMC hIMC, LPCOMPOSITIONFORM lpCompForm)
BOOL WINAPI ImmUnlockIMC(HIMC hIMC)
HIMC WINAPI ImmCreateContext(void)
HIMC WINAPI ImmGetContext(HWND hWnd)
BOOL WINAPI ImmDestroyContext(HIMC hIMC)
BOOL WINAPI ImmReleaseContext(HWND hWnd, HIMC hIMC)
LPINPUTCONTEXT WINAPI ImmLockIMC(HIMC hIMC)
HIMC WINAPI ImmAssociateContext(HWND hWnd, HIMC hIMC)
BOOL WINAPI ImmUnlockIMCC(HIMCC imcc)
DWORD WINAPI ImmGetIMCLockCount(HIMC hIMC)
DWORD WINAPI ImmGetIMCCLockCount(HIMCC imcc)
HIMCC WINAPI ImmCreateIMCC(DWORD size)
DWORD WINAPI ImmGetIMCCSize(HIMCC imcc)
HIMCC WINAPI ImmReSizeIMCC(HIMCC imcc, DWORD size)
LPVOID WINAPI ImmLockIMCC(HIMCC imcc)
HIMCC WINAPI ImmDestroyIMCC(HIMCC block)
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
DWORD WINAPI GetTickCount(VOID)
GLuint GLuint GLsizei count
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
HGLOBAL NTAPI GlobalHandle(LPCVOID pMem)
UINT NTAPI GlobalFlags(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
static void test_ImmGetContext(void)
static void msg_spy_cleanup(void)
static enum @1639 test_phase
static void test_ImmIsUIMessage(void)
static LRESULT CALLBACK call_wnd_proc_filter(int nCode, WPARAM wParam, LPARAM lParam)
static void test_InvalidIMC(void)
static HWND get_ime_window(void)
static void test_ImmNotifyIME(void)
static void test_ImmDestroyIMCC(void)
struct _tagTRANSMSG * LPTRANSMSG
static DWORD WINAPI test_ImmGetDefaultIMEWnd_thread(void *arg)
static void test_ImmAssociateContextEx(void)
static DWORD WINAPI test_default_ime_with_message_only_window_cb(void *arg)
static HWND thread_ime_wnd
static void msg_spy_pump_msg_queue(void)
static void msg_spy_init(HWND hwnd)
static LRESULT WINAPI imm_wnd_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static LRESULT CALLBACK processkey_wnd_proc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
struct _tagTRANSMSG TRANSMSG
static imm_msgs * msg_spy_find_msg(UINT message)
static void test_ImmThreads(void)
static void test_ImmGetDescription(void)
static void cleanup(void)
static DWORD WINAPI test_default_ime_window_cb(void *arg)
static void test_ImmGetIMCCLockCount(void)
static DWORD WINAPI test_default_ime_disabled_cb(void *arg)
static void test_ImmIME(void)
static void test_ImmMessages(void)
static BOOL CALLBACK is_ime_window_proc(HWND hWnd, LPARAM param)
static DWORD WINAPI ImmGetContextThreadFunc(LPVOID lpParam)
static LRESULT WINAPI wndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
static void test_ImmDefaultHwnd(void)
static imm_msgs * msg_spy_find_next_msg(UINT message, UINT *start)
static LRESULT CALLBACK get_msg_filter(int nCode, WPARAM wParam, LPARAM lParam)
struct _igc_threadinfo igc_threadinfo
static void test_ImmGetCompositionString(void)
static void test_ImmDestroyContext(void)
static struct @1640 ime_composition_test
static void test_ime_processkey(void)
static void test_default_ime_window_creation(void)
static const char wndcls[]
static struct _msg_spy msg_spy
static void test_ImmSetCompositionString(void)
static DWORD WINAPI test_default_ime_window_cancel_cb(void *arg)
static void msg_spy_flush_msgs(void)
static LRESULT WINAPI test_ime_wnd_proc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
static void test_ImmGetIMCLockCount(void)
#define IME_CONFIG_REGISTERWORD
#define NI_COMPOSITIONSTR
#define IMC_GETCANDIDATEPOS
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
BOOL WINAPI ImmGenerateMessage(HIMC hIMC)
LRESULT WINAPI ImmRequestMessageA(HIMC hIMC, WPARAM wParam, LPARAM lParam)
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
#define memcpy(s1, s2, n)
static struct test_info tests[]
static PEXPLICIT_ACCESSW *static HMODULE hmod
#define WS_OVERLAPPEDWINDOW
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventA(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
int WINAPI GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount)
DWORD WINAPI GetLastError(void)
DWORD WINAPI GetCurrentThreadId(void)
#define ERROR_INVALID_WINDOW_HANDLE
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
#define SetWindowLongPtrA
BOOL WINAPI IsWindow(_In_opt_ HWND)
HKL WINAPI GetKeyboardLayout(_In_ DWORD)
UINT WINAPI RegisterWindowMessageA(_In_ LPCSTR)
BOOL WINAPI SetWindowTextA(_In_ HWND, _In_opt_ LPCSTR)
BOOL WINAPI UnloadKeyboardLayout(_In_ HKL)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI UnregisterClassA(_In_ LPCSTR, HINSTANCE)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
HHOOK WINAPI SetWindowsHookExW(_In_ int, _In_ HOOKPROC, _In_opt_ HINSTANCE, _In_ DWORD)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
HWND WINAPI SetParent(_In_ HWND, _In_opt_ HWND)
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
BOOL WINAPI SetForegroundWindow(_In_ HWND)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
DWORD WINAPI MsgWaitForMultipleObjects(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ BOOL fWaitAll, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask)
int WINAPIV wsprintfA(_Out_ LPSTR, _In_ _Printf_format_string_ LPCSTR,...)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
HWND WINAPI GetDesktopWindow(void)
#define WM_IME_SETCONTEXT
ATOM WINAPI RegisterClassExA(_In_ CONST WNDCLASSEXA *)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI UnhookWindowsHookEx(_In_ HHOOK)
BOOL WINAPI PeekMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
HICON WINAPI LoadIconA(_In_opt_ HINSTANCE hInstance, _In_ LPCSTR lpIconName)
BOOL WINAPI UpdateWindow(_In_ HWND)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
#define WM_IME_COMPOSITIONFULL
HWND WINAPI GetParent(_In_ HWND)
LRESULT WINAPI CallNextHookEx(_In_opt_ HHOOK, _In_ int, _In_ WPARAM, _In_ LPARAM)
int WINAPI GetClassNameW(_In_ HWND hWnd, _Out_writes_to_(nMaxCount, return) LPWSTR lpClassName, _In_ int nMaxCount)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
BOOL WINAPI PeekMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
struct _WNDCLASSEXA WNDCLASSEXA
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
BOOL WINAPI PostThreadMessageA(_In_ DWORD, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI EnumThreadWindows(_In_ DWORD, _In_ WNDENUMPROC, _In_ LPARAM)
#define SetWindowLongPtrW
BOOL WINAPI GetMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI DestroyWindow(_In_ HWND)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)