https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4b038ec8b7019dca31219…
commit 4b038ec8b7019dca3121920540a75c3971e36845
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Wed Aug 12 06:03:29 2020 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed Aug 12 06:03:29 2020 +0900
[IMM32][NTUSER] Add ImmGetImeInfoEx (#3035)
- Add the definition of imm32!ImmGetImeInfoEx function.
- Add IMEINFOEXCLASS and IS_IME_HKL into "ntuser.h".
- Modify NtUserGetImeInfoEx function prototype.
CORE-11700
---
dll/win32/imm32/imm.c | 27 +++++++++++++++++++++++++++
dll/win32/imm32/imm32.spec | 2 +-
win32ss/include/ntuser.h | 12 ++++++++++--
win32ss/user/ntuser/ime.c | 6 +++---
4 files changed, 41 insertions(+), 6 deletions(-)
diff --git a/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c
index a493202a6aa..3b268feb545 100644
--- a/dll/win32/imm32/imm.c
+++ b/dll/win32/imm32/imm.c
@@ -3242,4 +3242,31 @@ BOOL WINAPI ImmRegisterClient(PVOID ptr, /* FIXME: should point to
SHAREDINFO st
FIXME("Stub\n");
return TRUE;
}
+
+/***********************************************************************
+ * ImmGetImeInfoEx (IMM32.@)
+ */
+BOOL WINAPI
+ImmGetImeInfoEx(PIMEINFOEX pImeInfoEx,
+ IMEINFOEXCLASS SearchType,
+ PVOID pvSearchKey)
+{
+ switch (SearchType)
+ {
+ case ImeInfoExKeyboardLayout:
+ pImeInfoEx->hkl = *(LPHKL)pvSearchKey;
+ if (!IS_IME_HKL(pImeInfoEx->hkl))
+ return FALSE;
+ break;
+
+ case ImeInfoExImeFileName:
+ lstrcpynW(pImeInfoEx->wszImeFile, (LPWSTR)pvSearchKey,
+ ARRAY_SIZE(pImeInfoEx->wszImeFile));
+ break;
+
+ default:
+ return FALSE;
+ }
+ return NtUserGetImeInfoEx(pImeInfoEx, SearchType);
+}
#endif
diff --git a/dll/win32/imm32/imm32.spec b/dll/win32/imm32/imm32.spec
index 1d6a8174ca3..62f39546332 100644
--- a/dll/win32/imm32/imm32.spec
+++ b/dll/win32/imm32/imm32.spec
@@ -46,7 +46,7 @@
@ stdcall ImmGetIMCLockCount(long)
@ stdcall ImmGetIMEFileNameA(long ptr long)
@ stdcall ImmGetIMEFileNameW(long ptr long)
-@ stub ImmGetImeInfoEx
+@ stdcall ImmGetImeInfoEx(ptr long ptr)
@ stdcall ImmGetImeMenuItemsA(long long long ptr ptr long)
@ stdcall ImmGetImeMenuItemsW(long long long ptr ptr long)
@ stdcall ImmGetOpenStatus(long)
diff --git a/win32ss/include/ntuser.h b/win32ss/include/ntuser.h
index 86cca3ab6e2..b997b21c848 100644
--- a/win32ss/include/ntuser.h
+++ b/win32ss/include/ntuser.h
@@ -1174,6 +1174,14 @@ typedef struct tagIMEINFOEX
};
} IMEINFOEX, *PIMEINFOEX;
+typedef enum IMEINFOEXCLASS
+{
+ ImeInfoExKeyboardLayout,
+ ImeInfoExImeFileName
+} IMEINFOEXCLASS;
+
+#define IS_IME_HKL(hkl) ((((ULONG_PTR)(hkl)) & 0xF0000000) == 0xE0000000)
+
typedef struct tagIMEUI
{
PWND spwnd;
@@ -2284,11 +2292,11 @@ NtUserGetImeHotKey(IN DWORD dwHotKey,
OUT LPUINT lpuVKey,
OUT LPHKL lphKL);
-DWORD
+BOOL
NTAPI
NtUserGetImeInfoEx(
PIMEINFOEX pImeInfoEx,
- DWORD dwUnknown2);
+ IMEINFOEXCLASS SearchType);
DWORD
NTAPI
diff --git a/win32ss/user/ntuser/ime.c b/win32ss/user/ntuser/ime.c
index c910738e9f6..4b587667e4e 100644
--- a/win32ss/user/ntuser/ime.c
+++ b/win32ss/user/ntuser/ime.c
@@ -103,14 +103,14 @@ NtUserGetAppImeLevel(
return 0;
}
-DWORD
+BOOL
APIENTRY
NtUserGetImeInfoEx(
PIMEINFOEX pImeInfoEx,
- DWORD dwUnknown2)
+ IMEINFOEXCLASS SearchType)
{
STUB;
- return 0;
+ return FALSE;
}