mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:25:48 +00:00
[IMM32][NTUSER] Strictly check Cicero IME (#8009)
This PR enhances Cicero IME support. JIRA issue: CORE-19268 - Add null checks for the functions of Cicero IMEs in Imm32LoadIME function. - Add and use IS_CICERO_COMPAT_DISABLED macro in win32ss/include/ntuser.h. - Fix ImmGetImeInfoEx, Imm32LoadImeDpi, ImmGetDescriptionA, ImmGetDescriptionW, ImmGetIMEFileNameA, ImmGetIMEFileNameW, and ImmGetProperty functions for Cicero IME support. - Set last error in NtUserGetImeInfoEx.
This commit is contained in:
parent
7ce90a0399
commit
c876fe350d
4 changed files with 58 additions and 79 deletions
|
@ -1206,9 +1206,14 @@ typedef struct tagCURSORDATA
|
|||
#define CURSORF_LINKED 0x0100
|
||||
#define CURSORF_CURRENT 0x0200
|
||||
|
||||
/* Flags for dwCompatFlags2 */
|
||||
#define COMPAT_FLAG_2_CICERO_DISABLED 2
|
||||
|
||||
#define IS_IMM_MODE() (gpsi && (gpsi->dwSRVIFlags & SRVINFO_IMM32))
|
||||
#define IS_CICERO_MODE() (gpsi && (gpsi->dwSRVIFlags & SRVINFO_CICERO_ENABLED))
|
||||
#define IS_16BIT_MODE() (GetWin32ClientInfo()->dwTIFlags & TIF_16BIT)
|
||||
#define IS_CICERO_COMPAT_DISABLED() \
|
||||
(GetWin32ClientInfo()->dwCompatFlags2 & COMPAT_FLAG_2_CICERO_DISABLED)
|
||||
|
||||
typedef struct tagIMEUI
|
||||
{
|
||||
|
|
|
@ -946,7 +946,6 @@ Quit:
|
|||
return ret;
|
||||
}
|
||||
|
||||
// Win: GetImeInfoEx
|
||||
BOOL FASTCALL
|
||||
UserGetImeInfoEx(
|
||||
_Inout_ PWINSTATION_OBJECT pWinSta,
|
||||
|
@ -1006,8 +1005,8 @@ UserGetImeInfoEx(
|
|||
BOOL
|
||||
NTAPI
|
||||
NtUserGetImeInfoEx(
|
||||
PIMEINFOEX pImeInfoEx,
|
||||
IMEINFOEXCLASS SearchType)
|
||||
_Inout_ PIMEINFOEX pImeInfoEx,
|
||||
_In_ IMEINFOEXCLASS SearchType)
|
||||
{
|
||||
IMEINFOEX ImeInfoEx;
|
||||
BOOL ret = FALSE;
|
||||
|
@ -1018,6 +1017,7 @@ NtUserGetImeInfoEx(
|
|||
if (!IS_IMM_MODE())
|
||||
{
|
||||
ERR("!IS_IMM_MODE()\n");
|
||||
EngSetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
goto Quit;
|
||||
}
|
||||
|
||||
|
@ -1824,6 +1824,12 @@ NtUserQueryInputContext(HIMC hIMC, DWORD dwType)
|
|||
if (ptiIMC->spDefaultImc)
|
||||
ret = (DWORD_PTR)UserHMGetHandle(ptiIMC->spDefaultImc);
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
FIXME("dwType: %ld\n", dwType);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Quit:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue