[IMM32][NTUSER] Fix NtUserGetThreadState call of Imm32InquireIme

There was a mistake of parameter value for NtUserGetThreadState
call in Imm32InquireIme function. This affected the logon process.

JIRA issue: CORE-19320

- Replace THREADSTATE_ISWINLOGON2 with THREADSTATE_ISWINLOGON in
  NtUserGetThreadState call in Imm32InquireIme function.
- Rename THREADSTATE_ISWINLOGON2 as THREADSTATE_UNKNOWN_0x10.
- Adapt NtUserGetThreadState to this change.
This commit is contained in:
Katayama Hirofumi MZ 2024-05-28 22:01:48 +09:00
parent 20f1bb4ab8
commit 4225717dc9
3 changed files with 5 additions and 3 deletions

View file

@ -51,7 +51,7 @@ BOOL APIENTRY Imm32InquireIme(PIMEDPI pImeDpi)
DWORD dwSysInfoFlags = 0;
LPIMEINFO pImeInfo = &pImeDpi->ImeInfo;
if (NtUserGetThreadState(THREADSTATE_ISWINLOGON2))
if (NtUserGetThreadState(THREADSTATE_ISWINLOGON))
dwSysInfoFlags |= IME_SYSINFO_WINLOGON;
if (GetWin32ClientInfo()->dwTIFlags & TIF_16BIT)

View file

@ -2485,7 +2485,7 @@ enum ThreadStateRoutines
THREADSTATE_IMECOMPATFLAGS,
THREADSTATE_OLDKEYBOARDLAYOUT,
THREADSTATE_ISWINLOGON,
THREADSTATE_ISWINLOGON2,
THREADSTATE_UNKNOWN_0x10,
THREADSTATE_CHECKCONIME,
THREADSTATE_GETTHREADINFO,
THREADSTATE_PROGMANWINDOW, /* FIXME: Delete this HACK */

View file

@ -340,9 +340,11 @@ NtUserGetThreadState(
ret = (ULONG_PTR)pti->hklPrev;
break;
case THREADSTATE_ISWINLOGON:
case THREADSTATE_ISWINLOGON2:
ret = (gpidLogon == PsGetCurrentProcessId());
break;
case THREADSTATE_UNKNOWN_0x10:
FIXME("stub\n");
break;
case THREADSTATE_CHECKCONIME:
ret = (IntTID2PTI(UlongToHandle(pti->rpdesk->dwConsoleThreadId)) == pti);
break;