https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2628309baf9f258fe71d0…
commit 2628309baf9f258fe71d0029598b1fd307c7a2b6
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Mon Nov 14 22:02:17 2022 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Mon Nov 14 22:02:17 2022 +0900
[IMM32_APITEST] Follow-up of #4876 (7355810)
CORE-11700
---
.../rostests/apitests/imm32/ImmEnumInputContext.c | 26 +++++++++++++++-------
1 file changed, 18 insertions(+), 8 deletions(-)
diff --git a/modules/rostests/apitests/imm32/ImmEnumInputContext.c
b/modules/rostests/apitests/imm32/ImmEnumInputContext.c
index cc9cd1df233..f424bb7ac90 100644
--- a/modules/rostests/apitests/imm32/ImmEnumInputContext.c
+++ b/modules/rostests/apitests/imm32/ImmEnumInputContext.c
@@ -13,6 +13,7 @@ static INT s_nCounter = 0;
static HIMC s_hImc1 = NULL;
static HIMC s_hImc2 = NULL;
static HIMC s_hImc3 = NULL;
+static HIMC s_hImc4 = NULL;
static BOOL CALLBACK
ImcEnumProc(HIMC hImc, LPARAM lParam)
@@ -42,23 +43,29 @@ ImcEnumProc(HIMC hImc, LPARAM lParam)
break;
case 5:
ok_long((LONG)lParam, 0xDEADBEEF);
+ s_hImc3 = hImc;
ok(hImc != s_hImc1, "hImc was %p, s_hImc1 was %p\n", hImc,
s_hImc1);
- ok(hImc != s_hImc2, "hImc was %p, s_hImc2 was %p\n", hImc,
s_hImc2);
break;
case 6:
ok_long((LONG)lParam, 0xBEEFCAFE);
- ok(hImc != s_hImc1, "hImc was %p, s_hImc1 was %p\n", hImc,
s_hImc1);
- ok(hImc != s_hImc2, "hImc was %p, s_hImc2 was %p\n", hImc,
s_hImc2);
+ ok(hImc == s_hImc3, "hImc was %p, s_hImc3 was %p\n", hImc,
s_hImc3);
break;
case 7:
ok_long((LONG)lParam, 0xDEADFACE);
- ok(hImc != s_hImc1, "hImc was %p, s_hImc1 was %p\n", hImc,
s_hImc1);
- ok(hImc != s_hImc2, "hImc was %p, s_hImc2 was %p\n", hImc,
s_hImc2);
+ ok(hImc == s_hImc3, "hImc was %p, s_hImc3 was %p\n", hImc,
s_hImc3);
break;
case 8:
ok_long((LONG)lParam, 0xDEADFACE);
+ ok(hImc == s_hImc4, "hImc was %p, s_hImc4 was %p\n", hImc,
s_hImc4);
+ break;
+ case 9:
+ ok_long((LONG)lParam, 0xFEEDF00D);
ok(hImc == s_hImc3, "hImc was %p, s_hImc3 was %p\n", hImc,
s_hImc3);
break;
+ case 10:
+ ok_long((LONG)lParam, 0xFEEDF00D);
+ ok(hImc == s_hImc1, "hImc was %p, s_hImc1 was %p\n", hImc,
s_hImc1);
+ break;
default:
ok_long(0, 1);
ok_int(0, 1);
@@ -76,13 +83,16 @@ static DWORD WINAPI AnotherThreadFunc(LPVOID arg)
ok_int(ImmEnumInputContext(GetCurrentThreadId(), ImcEnumProc, 0xBEEFCAFE), TRUE);
ok_int(s_nCounter, 7);
- s_hImc3 = ImmCreateContext();
+ s_hImc4 = ImmCreateContext();
ok_int(ImmEnumInputContext(0, ImcEnumProc, 0xDEADFACE), TRUE);
ok_int(s_nCounter, 9);
- ok_int(ImmDestroyContext(s_hImc3), TRUE);
- s_hImc3 = NULL;
+ ok_int(ImmDestroyContext(s_hImc4), TRUE);
+ s_hImc4 = NULL;
+
+ ok_int(ImmEnumInputContext((DWORD)-1, ImcEnumProc, 0xFEEDF00D), TRUE);
+ ok_int(s_nCounter, 11);
PostMessageW(s_hwnd, WM_COMMAND, IDYES, 0);
return 0;