https://git.reactos.org/?p=reactos.git;a=commitdiff;h=91e3d06cdb4d4a0d1876b…
commit 91e3d06cdb4d4a0d1876bc0eaae1447c61944246
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Thu Oct 20 12:47:15 2022 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Thu Oct 20 12:47:15 2022 +0900
[IMM32] Fix and improve Imm32InquireIme
CORE-11700
---
dll/win32/imm32/ime.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/dll/win32/imm32/ime.c b/dll/win32/imm32/ime.c
index 403d831a9b6..1a654825970 100644
--- a/dll/win32/imm32/ime.c
+++ b/dll/win32/imm32/ime.c
@@ -54,12 +54,15 @@ BOOL APIENTRY Imm32InquireIme(PIMEDPI pImeDpi)
if (NtUserGetThreadState(THREADSTATE_ISWINLOGON2))
dwSysInfoFlags |= IME_SYSINFO_WINLOGON;
+ if (GetWin32ClientInfo()->dwTIFlags & TIF_16BIT)
+ dwSysInfoFlags |= IME_SYSINFO_WOW16;
+
if (IS_IME_HKL(pImeDpi->hKL))
{
if (!pImeDpi->ImeInquire(pImeInfo, szUIClass, dwSysInfoFlags))
return FALSE;
}
- else if (IS_CICERO_MODE())
+ else if (IS_CICERO_MODE() && !IS_16BIT_MODE())
{
if (!pImeDpi->CtfImeInquireExW(pImeInfo, szUIClass, dwSysInfoFlags,
pImeDpi->hKL))
return FALSE;
@@ -139,11 +142,13 @@ BOOL APIENTRY Imm32InquireIme(PIMEDPI pImeDpi)
}
else
{
- if (pImeDpi->uCodePage != GetACP() && pImeDpi->uCodePage)
+ if (pImeDpi->uCodePage != GetACP() && pImeDpi->uCodePage !=
CP_ACP)
return FALSE;
MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, (LPSTR)szUIClass, -1,
pImeDpi->szUIClass, _countof(pImeDpi->szUIClass));
+
+ pImeDpi->szUIClass[_countof(pImeDpi->szUIClass) - 1] = UNICODE_NULL;
}
return GetClassInfoW(pImeDpi->hInst, pImeDpi->szUIClass, &wcW);