573
573
ok(ImmReleaseContext(hwnd, himc), "ImmReleaseContext failed\n");
576
static void test_ImmGetDescription(void)
579
WCHAR japime[] = { 'E', '0', '0', '1', '0', '4', '1', '1', 0 };
584
/* FIXME: invalid keyboard layouts should not pass */
585
ret = ImmGetDescriptionW(NULL, NULL, 0);
586
todo_wine ok(!ret, "ImmGetDescriptionW failed, expected 0 received %d.\n", ret);
588
/* load a language with valid IMM descriptions */
589
hkl = LoadKeyboardLayoutW(japime, KLF_ACTIVATE);
590
todo_wine ok(hkl != 0, "LoadKeyboardLayoutW failed, expected != 0.\n");
592
ret = ImmGetDescriptionW(hkl, NULL, 0);
595
win_skip("ImmGetDescriptionW is not working for current loaded keyboard.\n");
599
ret = ImmGetDescriptionW(hkl, descW, 0);
600
ok(ret, "ImmGetDescriptionW failed, expected != 0 received 0.\n");
602
lret = ImmGetDescriptionW(hkl, descW, ret + 1);
603
ok(lret, "ImmGetDescriptionW failed, expected != 0 received 0.\n");
604
ok(lret == ret, "ImmGetDescriptionW failed to return the correct amount of data. Expected %d, got %d.\n", ret, lret);
606
lret = ImmGetDescriptionA(hkl, descA, ret + 1);
607
ok(lret, "ImmGetDescriptionA failed, expected != 0 received 0.\n");
608
todo_wine ok(lret == ret, "ImmGetDescriptionA failed to return the correct amount of data. Expected %d, got %d.\n", ret, lret);
610
ret /= 2; /* try to copy partially */
611
lret = ImmGetDescriptionW(hkl, descW, ret + 1);
612
ok(lret, "ImmGetDescriptionW failed, expected != 0 received 0.\n");
613
ok(lret == ret, "ImmGetDescriptionW failed to return the correct amount of data. Expected %d, got %d.\n", ret, lret);
615
ret = ImmGetDescriptionW(hkl, descW, 1);
616
ok(!ret, "ImmGetDescriptionW failed, expected 0 received %d.\n", ret);
618
UnloadKeyboardLayout(hkl);
576
621
START_TEST(imm32) {