https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cf32c7cb5e8087f7c5ce4…
commit cf32c7cb5e8087f7c5ce40b8e9f7b4ac90897c80
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Thu Feb 10 15:05:59 2022 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Thu Feb 10 15:05:59 2022 +0900
[IMM32] Implement ImmSendMessageToActiveDefImeWndW
CORE-11700
---
dll/win32/imm32/imm32.spec | 2 +-
dll/win32/imm32/keymsg.c | 18 ++++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/dll/win32/imm32/imm32.spec b/dll/win32/imm32/imm32.spec
index 956b8a7cee2..59fb8f37956 100644
--- a/dll/win32/imm32/imm32.spec
+++ b/dll/win32/imm32/imm32.spec
@@ -91,7 +91,7 @@
@ stdcall ImmRequestMessageW(ptr ptr ptr)
@ stdcall ImmSendIMEMessageExA(ptr ptr)
@ stdcall ImmSendIMEMessageExW(ptr ptr)
-@ stub ImmSendMessageToActiveDefImeWndW
+@ stdcall ImmSendMessageToActiveDefImeWndW(long ptr ptr)
@ stdcall ImmSetActiveContext(ptr ptr long)
@ stdcall ImmSetActiveContextConsoleIME(ptr long)
@ stdcall ImmSetCandidateWindow(ptr ptr)
diff --git a/dll/win32/imm32/keymsg.c b/dll/win32/imm32/keymsg.c
index 4273220d24b..a8fa1d84b83 100644
--- a/dll/win32/imm32/keymsg.c
+++ b/dll/win32/imm32/keymsg.c
@@ -1048,3 +1048,21 @@ LRESULT WINAPI ImmRequestMessageW(HIMC hIMC, WPARAM wParam, LPARAM
lParam)
TRACE("(%p, %p, %p)\n", hIMC, wParam, lParam);
return Imm32RequestMessageAW(hIMC, wParam, lParam, FALSE);
}
+
+/***********************************************************************
+ * ImmSendMessageToActiveDefImeWndW (IMM32.@)
+ */
+LRESULT WINAPI
+ImmSendMessageToActiveDefImeWndW(UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ HWND hwndIME;
+
+ if (uMsg != WM_COPYDATA)
+ return 0;
+
+ hwndIME = (HWND)NtUserQueryWindow((HWND)wParam, QUERY_WINDOW_DEFAULT_IME);
+ if (!hwndIME)
+ return 0;
+
+ return SendMessageW(hwndIME, uMsg, wParam, lParam);
+}