134 fprintf(
stdout,
"%s:%d: msg_spy: message buffer overflow!\n",
169 if (
msg_spy.call_wnd_proc_hook)
178static const char wndcls[] =
"winetest_imm32_wndcls";
187 HWND default_ime_wnd;
197 ok(!default_ime_wnd,
"expected no IME windows\n");
200 ok(default_ime_wnd !=
NULL,
"expected IME window existence\n");
214 ok(default_ime_wnd !=
NULL,
"expected IME window existence\n");
217 ok(!default_ime_wnd,
"expected no IME windows\n");
229 ok(default_ime_wnd !=
NULL,
"expected IME window existence\n");
232 ok(!default_ime_wnd,
"expected no IME windows\n");
281 win_skip(
"IME support not implemented\n");
303 static char string[] =
"wine";
305 static const char string[] =
"wine";
307 char resstr[16] =
"";
317 "Canceling an empty composition string should succeed.\n");
319 "WM_IME_COMPOSITION in response to NI_COMPOSITIONSTR / CPS_CANCEL, if "
320 "the composition string being canceled is empty.\n");
330 ok(!
ret,
"After being cancelled the composition string is empty.\n");
337 "Canceling an empty composition string should succeed.\n");
339 "WM_IME_COMPOSITION in response to NI_COMPOSITIONSTR / CPS_CANCEL, if "
340 "the composition string being canceled is empty.\n");
350 ok (
ret == 0,
"Bad IME should return 0\n");
355 ok (
ret == 0,
"NULL IME should return 0\n");
360 ok (
ret == 0,
"Destroyed IME should return 0\n");
378 case WM_IME_COMPOSITION:
387 ok(hwndIme !=
NULL,
"expected IME window existence\n");
400 wstring,
sizeof(wstring));
401 ok(
size > 0,
"ImmGetCompositionString(GCS_RESULTSTR) is %d\n",
size);
436 static WCHAR string[] = {
'w',
'i',
'n',
'e',0x65e5,0x672c,0x8a9e};
438 static const WCHAR string[] = {
'w',
'i',
'n',
'e',0x65e5,0x672c,0x8a9e};
450 win_skip(
"Composition isn't supported\n");
462 ok(
len*
sizeof(
WCHAR)==wlen,
"GCS_COMPATTR(W) not returning correct count\n");
464 ok(
len==alen,
"GCS_COMPATTR(A) not returning correct count\n");
467 memset(wstring, 0x1a,
sizeof(wstring));
468 memset(cstring, 0x1a,
sizeof(cstring));
471 ok(
len == alen,
"Unexpected length %d.\n",
len);
472 ok(cstring[alen] == 0x1a,
"Unexpected buffer contents.\n");
475 ok(
len == wlen,
"Unexpected length %d.\n",
len);
476 ok(wstring[wlen/
sizeof(
WCHAR)] == 0x1a1a,
"Unexpected buffer contents.\n");
479 memset(wstring, 0x1a,
sizeof(wstring));
480 memset(cstring, 0x1a,
sizeof(cstring));
484 ok(!
len,
"Unexpected length %d.\n",
len);
485 ok(cstring[0] ==
'w',
"Unexpected buffer contents %s.\n", cstring);
488 ok(
len == wlen - 1,
"Unexpected length %d.\n",
len);
489 ok(!
memcmp(wstring,
string, wlen - 1),
"Unexpected buffer contents.\n");
492 memset(wstring, 0x1a,
sizeof(wstring));
493 memset(cstring, 0x1a,
sizeof(cstring));
496 ok(
len == alen,
"Unexpected length %d.\n",
len);
497 ok(cstring[0] == 0x1a,
"Unexpected buffer contents %s.\n", cstring);
500 ok(
len == wlen,
"Unexpected length %d.\n",
len);
501 ok(wstring[0] == 0x1a1a,
"Unexpected buffer contents.\n");
504 win_skip(
"Composition string isn't available\n");
512 skip(
"This IME doesn't support SCS_SETSTR\n");
522 string,
sizeof(
string),
NULL,0);
523 ok(
ret,
"ImmSetCompositionStringW failed\n");
525 wstring,
sizeof(wstring));
528 ok(
ret,
"ImmNotifyIME(CPS_COMPLETE) failed\n");
531 "WM_IME_COMPOSITION(GCS_RESULTSTR) isn't sent\n");
534 win_skip(
"Composition string isn't available\n");
546 const DWORD MY_TIMER = 0xcaffe;
549 "IME composition test",
554 "Input a DBCS character here using IME.",
575 skip(
"WM_IME_COMPOSITION(GCS_RESULTSTR) isn't tested\n");
587 ok(imc != 0,
"ImmGetContext() failed. Last error: %u\n",
GetLastError());
594 "ImmSetCompositionStringW() failed.\n");
598 ok(!
ret,
"ImmSetCompositionStringW() succeeded.\n");
602 ok(!
ret,
"ImmSetCompositionStringW() succeeded.\n");
606 ok(!
ret,
"ImmSetCompositionStringW() succeeded.\n");
610 ok(!
ret,
"ImmSetCompositionStringW() succeeded.\n");
628 ok (rc == 0,
"ImmConfigureIMEA did not fail\n");
634 ok (rc == 0,
"ImmConfigureIMEW did not fail\n");
644 if (!pImmAssociateContextEx)
return;
652 ok(newimc != imc,
"handles should not be the same\n");
653 rc = pImmAssociateContextEx(
NULL,
NULL, 0);
654 ok(!rc,
"ImmAssociateContextEx succeeded\n");
655 rc = pImmAssociateContextEx(
hwnd,
NULL, 0);
656 ok(rc,
"ImmAssociateContextEx failed\n");
657 rc = pImmAssociateContextEx(
NULL, imc, 0);
658 ok(!rc,
"ImmAssociateContextEx succeeded\n");
660 rc = pImmAssociateContextEx(
hwnd, imc, 0);
661 ok(rc,
"ImmAssociateContextEx failed\n");
663 ok(retimc == imc,
"handles should be the same\n");
666 rc = pImmAssociateContextEx(
hwnd, newimc, 0);
667 ok(rc,
"ImmAssociateContextEx failed\n");
669 ok(retimc == newimc,
"handles should be the same\n");
672 rc = pImmAssociateContextEx(
hwnd,
NULL, IACE_DEFAULT);
673 ok(rc,
"ImmAssociateContextEx failed\n");
701 ok(
info->himc == h1,
"hwnd context changed in new thread\n");
703 ok(h2 != h1,
"new hwnd in new thread should have different context\n");
712 ok(h1 == h2,
"Windows in same thread should have same default context\n");
740 HIMC himc, otherHimc, h1;
753 threadinfo.
himc = himc;
759 ok(himc != otherHimc,
"Windows from other threads should have different himc\n");
760 ok(otherHimc == threadinfo.
himc,
"Context from other thread should not change in main thread\n");
763 ok(h1 ==
NULL,
"Should fail to be able to Associate a default context from a different thread\n");
765 ok(h1 == himc,
"Context for window should remain unchanged\n");
769 ok (h1 ==
NULL,
"Should fail to associate a context from a different thread\n");
771 ok(h1 == himc,
"Context for window should remain unchanged\n");
775 ok (h1 ==
NULL,
"Should fail to associate a context from a different thread into a window from that thread.\n");
777 ok(h1 == threadinfo.
himc,
"Context for window should remain unchanged\n");
782 ok(rc != 0,
"ImmSetOpenStatus failed\n");
784 ok(rc != 0,
"ImmGetOpenStatus failed\n");
786 ok(rc != 0,
"ImmSetOpenStatus failed\n");
788 ok(rc == 0,
"ImmGetOpenStatus failed\n");
791 ok(rc == 0,
"ImmSetOpenStatus should fail\n");
793 ok(rc == 0,
"ImmSetOpenStatus should fail\n");
795 ok(rc == 0,
"ImmGetOpenStatus failed\n");
797 ok (rc == 1 ||
broken(rc == 0),
"ImmGetOpenStatus should return 1\n");
799 ok(rc == 0,
"ImmSetOpenStatus should fail\n");
801 ok(rc == 0,
"ImmGetOpenStatus failed\n");
805 ok(rc != 0,
"ImmGetCompositionFont failed\n");
807 ok(rc != 0,
"ImmSetCompositionFont failed\n");
810 ok(rc != 0 ||
broken(rc == 0),
"ImmGetCompositionFont failed\n");
812 ok(rc != 0 ||
broken(rc == 0),
"ImmGetCompositionFont user himc failed\n");
814 ok(rc == 0,
"ImmSetCompositionFont should fail\n");
816 ok(rc == 0,
"ImmSetCompositionFont should fail\n");
820 ok(rc != 0,
"ImmSetCompositionWindow failed\n");
822 ok(rc != 0,
"ImmGetCompositionWindow failed\n");
825 ok(rc == 0,
"ImmSetCompositionWindow should fail\n");
827 ok(rc == 0,
"ImmSetCompositionWindow should fail\n");
829 ok(rc != 0 ||
broken(rc == 0),
"ImmGetCompositionWindow failed\n");
831 ok(rc != 0 ||
broken(rc == 0),
"ImmGetCompositionWindow failed\n");
835 ok(rc != 0,
"ImmGetConversionStatus failed\n");
837 ok(rc != 0,
"ImmSetConversionStatus failed\n");
840 ok(rc != 0 ||
broken(rc == 0),
"ImmGetConversionStatus failed\n");
842 ok(rc != 0 ||
broken(rc == 0),
"ImmGetConversionStatus failed\n");
844 ok(rc == 0,
"ImmSetConversionStatus should fail\n");
846 ok(rc == 0,
"ImmSetConversionStatus should fail\n");
850 ok(rc != 0,
"ImmSetStatusWindowPos failed\n");
852 ok(rc != 0,
"ImmGetStatusWindowPos failed\n");
855 ok(rc == 0,
"ImmSetStatusWindowPos should fail\n");
857 ok(rc == 0,
"ImmSetStatusWindowPos should fail\n");
859 ok(rc != 0 ||
broken(rc == 0),
"ImmGetStatusWindowPos failed\n");
861 ok(rc != 0 ||
broken(rc == 0),
"ImmGetStatusWindowPos failed\n");
864 ok (h1 == otherHimc,
"ImmAssociateContext cross thread with NULL should work\n");
866 ok (h1 ==
NULL,
"CrossThread window context should be NULL\n");
868 ok (h1 ==
NULL,
"Resetting cross thread context should fail\n");
870 ok (h1 ==
NULL,
"CrossThread window context should still be NULL\n");
873 ok (rc == 0,
"ImmDestroyContext Cross Thread should fail\n");
877 ok (rc == 0,
"ImmGetCandidateWindow should fail\n");
883 ok (rc == 1,
"ImmSetCandidateWindow should succeed\n");
885 ok (rc == 1,
"ImmGetCandidateWindow should succeed\n");
888 ok (rc == 0,
"ImmGetCandidateWindow should fail\n");
890 ok (rc == 0,
"ImmSetCandidateWindow should fail\n");
892 ok (rc == 1 ||
broken( rc == 0),
"ImmGetCandidateWindow should succeed\n");
894 ok (rc == 0,
"ImmSetCandidateWindow should fail\n");
901 ok(rc == 1,
"PostThreadMessage should succeed\n");
906 ok(himc ==
NULL,
"Should not be able to get himc from other process window\n");
920 { WM_IME_STARTCOMPOSITION,
TRUE },
921 { WM_IME_ENDCOMPOSITION,
TRUE },
922 { WM_IME_COMPOSITION,
TRUE },
947 if (!pImmIsUIMessageA)
return;
953 ok(
ret ==
test->ret,
"ImmIsUIMessageA returned %x for %x\n",
ret,
test->msg);
957 ok(
ret ==
test->ret,
"ImmIsUIMessageA returned %x for %x\n",
ret,
test->msg);
965 ok(!
ret,
"ImmIsUIMessageA returned TRUE for WM_MSIME_SERVICE\n");
966 ret = pImmIsUIMessageA(
NULL, WM_MSIME_RECONVERTOPTIONS, 0, 0);
967 ok(!
ret,
"ImmIsUIMessageA returned TRUE for WM_MSIME_RECONVERTOPTIONS\n");
969 ok(!
ret,
"ImmIsUIMessageA returned TRUE for WM_MSIME_MOUSE\n");
971 ok(!
ret,
"ImmIsUIMessageA returned TRUE for WM_MSIME_RECONVERTREQUEST\n");
973 ok(!
ret,
"ImmIsUIMessageA returned TRUE for WM_MSIME_RECONVERT\n");
975 ok(!
ret,
"ImmIsUIMessageA returned TRUE for WM_MSIME_QUERYPOSITION\n");
977 ok(!
ret,
"ImmIsUIMessageA returned TRUE for WM_MSIME_DOCUMENTFEED\n");
988 ok(himc ==
NULL,
"ImmGetContext succeeded\n");
992 ok(himc !=
NULL,
"ImmGetContext failed\n");
1005 ok(!
ret,
"ImmGetDescriptionW failed, expected 0 received %d.\n",
ret);
1007 ok(!
ret,
"ImmGetDescriptionA failed, expected 0 received %d.\n",
ret);
1011 ok(
hkl != 0,
"GetKeyboardLayout failed, expected != 0.\n");
1016 win_skip(
"ImmGetDescriptionW is not working for current loaded keyboard.\n");
1022 ok (
ret == 0,
"ImmGetDescriptionW with 0 hkl should return 0\n");
1024 ok (
ret == 0xdeadcafe,
"Last Error should remain unchanged\n");
1027 ok(
ret,
"ImmGetDescriptionW failed, expected != 0 received 0.\n");
1030 ok(lret,
"ImmGetDescriptionW failed, expected != 0 received 0.\n");
1031 ok(lret ==
ret,
"ImmGetDescriptionW failed to return the correct amount of data. Expected %d, got %d.\n",
ret, lret);
1034 ok(lret,
"ImmGetDescriptionA failed, expected != 0 received 0.\n");
1035 ok(lret ==
ret,
"ImmGetDescriptionA failed to return the correct amount of data. Expected %d, got %d.\n",
ret, lret);
1039 ok(lret,
"ImmGetDescriptionW failed, expected != 0 received 0.\n");
1040 ok(lret ==
ret,
"ImmGetDescriptionW failed to return the correct amount of data. Expected %d, got %d.\n",
ret, lret);
1043 ok(!lret,
"ImmGetDescriptionA should fail\n");
1046 ok(!
ret,
"ImmGetDescriptionW failed, expected 0 received %d.\n",
ret);
1061 CreateWindowA(
"static",
"static",
WS_POPUP, 0, 0, 1, 1,
NULL,
NULL,
NULL,
NULL);
1071 HIMC imc1, imc2, imc3;
1087 win_skip(
"IME support not implemented\n");
1106 ok(def3 == def1,
"Default IME window should not change\n");
1107 ok(imc1 == imc3,
"IME context should not change\n");
1124 static const WCHAR imeW[] = {
'I',
'M',
'E',0};
1125 WCHAR class_nameW[16];
1151 HWND hwnd1, hwnd2, default_ime_wnd, ime_wnd;
1168 ok(ime_wnd !=
NULL,
"Expected IME window existence\n");
1170 ok(ime_wnd == default_ime_wnd,
"Expected %p, got %p\n", ime_wnd, default_ime_wnd);
1181 "Expected IME window existence\n");
1183 ok(!
IsWindow(ime_wnd),
"Expected no IME windows\n");
1191 HWND hwnd1, hwnd2, default_ime_wnd, ime_wnd;
1199 ok(hwnd1 ==
NULL,
"creation succeeded, got %p\n", hwnd1);
1207 ok(hwnd1 ==
NULL,
"creation succeeded, got %p\n", hwnd1);
1216 ok(ime_wnd !=
NULL,
"Expected IME window existence\n");
1218 ok(ime_wnd == default_ime_wnd,
"Expected %p, got %p\n", ime_wnd, default_ime_wnd);
1221 ok(!
IsWindow(ime_wnd),
"Expected no IME windows\n");
1237 ok(!default_ime_wnd,
"Expected no IME windows\n");
1244 HWND hwnd1, hwnd2, default_ime_wnd;
1252 ok(!
IsWindow(default_ime_wnd),
"Expected no IME windows, got %p\n", default_ime_wnd);
1259 ok(
IsWindow(default_ime_wnd),
"Expected IME window existence\n");
1269 ok(
IsWindow(default_ime_wnd),
"Expected IME window existence\n");
1272 ok(
IsWindow(default_ime_wnd),
"Expected IME window existence\n");
1334 ok(
count == 0,
"Invalid IMC should return 0\n");
1339 ok(
count == 0,
"NULL IMC should return 0\n");
1341 ok(
ret == 0xdeadbeef,
"Last Error should remain unchanged: %08x\n",
ret);
1343 ok(
count == 0,
"Destroyed IMC should return 0\n");
1351 ok(ic !=
NULL,
"ImmLockIMC failed!\n");
1366 ok(ic !=
NULL,
"ImmLockIMC failed!\n");
1412 ok(
count == g_count,
"count %d, g_count %d\n",
count, g_count);
1438 ok(ic !=
NULL,
"ImmLockIMC failed!\n");
1442 ok(
ret ==
TRUE,
"Destroy a locked IMC should success!\n");
1444 ok(ic ==
NULL,
"Lock a destroyed IMC should fail!\n");
1446 ok(
ret ==
FALSE,
"Unlock a destroyed IMC should fail!\n");
1448 ok(
count == 0,
"Get lock count of a destroyed IMC should return 0!\n");
1451 ok(
ret ==
FALSE,
"Destroy a destroyed IMC should fail!\n");
1466 ok(
p !=
NULL,
"ImmLockIMCC failed!\n");
1472 ok(
p ==
NULL,
"Destroy a locked IMCC should success!\n");
1474 ok(
p ==
NULL,
"Lock a destroyed IMCC should fail!\n");
1476 ok(
ret ==
FALSE,
"Unlock a destroyed IMCC should return FALSE!\n");
1478 ok(
count == 0,
"Get lock count of a destroyed IMCC should return 0!\n");
1480 ok(
size == 0,
"Get size of a destroyed IMCC should return 0!\n");
1483 ok(
p !=
NULL,
"returned NULL\n");
1513 if (
msg)
ok(!
msg->post,
"Message should not be posted\n");
1521 lpTransMsg->
message = WM_IME_STARTCOMPOSITION;
1532 if (
msg)
ok(!
msg->post,
"Message should not be posted\n");
1540 lpTransMsg->
message = WM_IME_COMPOSITION;
1551 if (
msg)
ok(!
msg->post,
"Message should not be posted\n");
1559 lpTransMsg->
message = WM_IME_ENDCOMPOSITION;
1570 if (
msg)
ok(!
msg->post,
"Message should not be posted\n");
1587 WCHAR classNameW[] = {
'P',
'r',
'o',
'c',
'e',
's',
's',
'K',
'e',
'y',
'T',
'e',
's',
't',
'C',
'l',
'a',
's',
's',0};
1588 WCHAR windowNameW[] = {
'P',
'r',
'o',
'c',
'e',
's',
's',
'K',
'e',
'y',0};
1609 win_skip(
"Failed to register window.\n");
1651 inputs[0].
u.
ki.
wVk = 0x41;
1655 pSendInput(1, (
INPUT*)inputs,
sizeof(
INPUT));
1665 trace(
"ProcessKey was correctly found\n");
1671 inputs[0].
u.
ki.
wVk = 0x41;
1675 pSendInput(1, (
INPUT*)inputs,
sizeof(
INPUT));
1698 HIMC imc_null = 0x00000000;
1701 HIMC imc1, imc2, oldimc;
1708 memset(&lf, 0,
sizeof(lf));
1712 ok(
ret ==
TRUE,
"Destroy an IMC should success!\n");
1718 ok(!oldimc,
"Associating to a destroyed imc should fail!\n");
1722 ok(imc1 == imc2,
"imc should not changed! imc1 %p, imc2 %p\n", imc1, imc2);
1726 ok(oldimc !=
NULL,
"Associating to NULL imc should success!\n");
1728 ok(!imc2,
"expect NULL, returned %p\n", imc2);
1730 ok(!oldimc,
"expect NULL, returned %p\n", oldimc);
1732 ok(imc2 == imc1,
"imc should not changed! imc2 %p, imc1 %p\n", imc2, imc1);
1738 ok(!oldimc,
"Associating to a destroyed imc should fail!\n");
1742 ok(imc1 == imc2,
"imc should not changed! imc1 %p, imc2 %p\n", imc1, imc2);
1748 ok(
ret == 0,
"Bad IME should return 0\n");
1753 ok(
ret == 0,
"NULL IME should return 0\n");
1755 ok(
ret == 0xdeadbeef,
"last error should remain unchanged %08x!\n",
ret);
1758 ok(
ret == 0,
"Destroyed IME should return 0\n");
1765 ok(
ret == 0,
"Bad IME should return 0\n");
1770 ok(
ret == 0,
"NULL IME should return 0\n");
1772 ok(
ret == 0xdeadbeef,
"last error should remain unchanged %08x!\n",
ret);
1775 ok(
ret == 0,
"Destroyed IME should return 0\n");
1782 ok(
ret == 0,
"Bad IME should return 0\n");
1787 ok(
ret == 0,
"NULL IME should return 0\n");
1789 ok(
ret == 0xdeadbeef,
"last error should remain unchanged %08x!\n",
ret);
1792 ok(
ret == 0,
"Destroyed IME should return 0\n");
1799 ok(
ret == 0,
"Bad IME should return 0\n");
1804 ok(
ret == 0,
"NULL IME should return 0\n");
1806 ok(
ret == 0xdeadbeef,
"last error should remain unchanged %08x!\n",
ret);
1809 ok(
ret == 0,
"Destroyed IME should return 0\n");
1816 ok(
ret == 0,
"Bad IME should return 0\n");
1821 ok(
ret == 0,
"NULL IME should return 0\n");
1823 ok(
ret == 0xdeadbeef,
"last error should remain unchanged %08x!\n",
ret);
1826 ok(
ret == 0,
"Destroyed IME should return 0\n");
1833 ok(
ret == 0,
"Bad IME should return 0\n");
1838 ok(
ret == 0,
"NULL IME should return 0\n");
1840 ok(
ret == 0xdeadbeef,
"last error should remain unchanged %08x!\n",
ret);
1843 ok(
ret == 0,
"Destroyed IME should return 0\n");
1850 ok(
ret == 0,
"Bad IME should return 0\n");
1855 ok(
ret == 0,
"NULL IME should return 0\n");
1860 ok(
ret == 0,
"Destroyed IME should return 0\n");
1867 ok(
ret == 0,
"Bad IME should return 0\n");
1872 ok(
ret == 0,
"NULL IME should return 0\n");
1874 ok(
ret == 0xdeadbeef,
"last error should remain unchanged %08x!\n",
ret);
1877 ok(
ret == 0,
"Destroyed IME should return 0\n");
1884 ok(
ret == 0,
"Bad IME should return 0\n");
1889 ok(
ret == 0,
"NULL IME should return 0\n");
1891 ok(
ret == 0xdeadbeef,
"last error should remain unchanged %08x!\n",
ret);
1894 ok(
ret == 0,
"Destroyed IME should return 0\n");
1901 ok(
ret == 0,
"Bad IME should return 0\n");
1906 ok(
ret == 0,
"NULL IME should return 0\n");
1911 ok(
ret == 0,
"Destroyed IME should return 0\n");
1918 ok(
ret == 0,
"Bad IME should return 0\n");
1923 ok(
ret == 0,
"NULL IME should return 0\n");
1928 ok(
ret == 0,
"Destroyed IME should return 0\n");
1935 ok(
ret == 0,
"Bad IME should return 0\n");
1940 ok(
ret == 0,
"NULL IME should return 0\n");
1945 ok(
ret == 0,
"Destroyed IME should return 0\n");
1952 ok(
ret == 0,
"Bad IME should return 0\n");
1957 ok(
ret == 0,
"NULL IME should return 0\n");
1962 ok(
ret == 0,
"Destroyed IME should return 0\n");
1969 ok(
ret == 0,
"Bad IME should return 0\n");
1974 ok(
ret == 0,
"NULL IME should return 0\n");
1979 ok(
ret == 0,
"Destroyed IME should return 0\n");
1986 ok(
ret == 0,
"Bad IME should return 0\n");
1991 ok(
ret == 0,
"NULL IME should return 0\n");
1996 ok(
ret == 0,
"Destroyed IME should return 0\n");
2003 ok(ic == 0,
"Bad IME should return 0\n");
2008 ok(ic == 0,
"NULL IME should return 0\n");
2010 ok(
ret == 0xdeadbeef,
"last error should remain unchanged %08x!\n",
ret);
2013 ok(ic == 0,
"Destroyed IME should return 0\n");
2020 ok(
ret == 0,
"Bad IME should return 0\n");
2025 ok(
ret == 0,
"NULL IME should return 0\n");
2027 ok(
ret == 0xdeadbeef,
"last error should remain unchanged %08x!\n",
ret);
2030 ok(
ret == 0,
"Destroyed IME should return 0\n");
2037 ok(
ret == 0,
"Bad IME should return 0\n");
2042 ok(
ret == 0,
"NULL IME should return 0\n");
2047 ok(
ret == 0,
"Destroyed IME should return 0\n");
2078 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)
BOOL WINAPI ImmNotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD_PTR dwValue)
DWORD WINAPI ImmGetProperty(HKL hKL, DWORD fdwIndex)
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)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
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 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)
static struct @1671 ime_composition_test
static enum @1670 test_phase
struct _igc_threadinfo igc_threadinfo
static void test_ImmGetCompositionString(void)
static void test_ImmDestroyContext(void)
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 IMC_GETCANDIDATEPOS
#define NI_COMPOSITIONSTR
_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)
#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
UINT WM_MSIME_RECONVERTREQUEST
UINT WM_MSIME_DOCUMENTFEED
UINT WM_MSIME_QUERYPOSITION
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)