https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4f006ec74b2d06561c411…
commit 4f006ec74b2d06561c4112af878e2d9fb4a29354
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Tue Oct 5 14:07:58 2021 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Tue Oct 5 14:07:58 2021 +0900
[IMM32] Add IMP stub functions (#3989)
- Add IMP (Input Method Profiler) stub functions (ImmIMPGetIMEA/W, ImmIMPQueryIMEA/W,
ImmIMPSetIMEA/W).
- Add ImmSendIMEMessageExA/W stub functions.
- Rename nt3.c as win3.c.
The prototypes can be obtained from:
https://doxygen.reactos.org/dc/d20/winnls32_8h.html .
The Japanese article of IMP is available:
http://www7a.biglobe.ne.jp/~tsuneoka/win32tech/7.html
CORE-11700
---
dll/win32/imm32/CMakeLists.txt | 2 +-
dll/win32/imm32/imm32.spec | 16 ++++++------
dll/win32/imm32/keymsg.c | 6 ++---
dll/win32/imm32/precomp.h | 1 +
dll/win32/imm32/utils.c | 54 +++++++++++++++++++++++++++++++++++++++
dll/win32/imm32/{nt3.c => win3.c} | 28 ++++++++++++++++----
6 files changed, 90 insertions(+), 17 deletions(-)
diff --git a/dll/win32/imm32/CMakeLists.txt b/dll/win32/imm32/CMakeLists.txt
index bb50a71ab63..3597068bdbc 100644
--- a/dll/win32/imm32/CMakeLists.txt
+++ b/dll/win32/imm32/CMakeLists.txt
@@ -13,9 +13,9 @@ list(APPEND SOURCE
ime.c
imm.c
keymsg.c
- nt3.c
regword.c
utils.c
+ win3.c
${CMAKE_CURRENT_BINARY_DIR}/imm32_stubs.c
${CMAKE_CURRENT_BINARY_DIR}/imm32.def)
diff --git a/dll/win32/imm32/imm32.spec b/dll/win32/imm32/imm32.spec
index 162d3d0c4ff..1ee3a2c8cb0 100644
--- a/dll/win32/imm32/imm32.spec
+++ b/dll/win32/imm32/imm32.spec
@@ -61,12 +61,12 @@
@ stdcall ImmGetRegisterWordStyleW(long long ptr)
@ stdcall ImmGetStatusWindowPos(ptr ptr)
@ stdcall ImmGetVirtualKey(ptr)
-@ stdcall -stub ImmIMPGetIMEA(ptr ptr)
-@ stdcall -stub ImmIMPGetIMEW(ptr ptr)
-@ stdcall -stub ImmIMPQueryIMEA(ptr)
-@ stdcall -stub ImmIMPQueryIMEW(ptr)
-@ stdcall -stub ImmIMPSetIMEA(ptr ptr)
-@ stdcall -stub ImmIMPSetIMEW(ptr ptr)
+@ stdcall ImmIMPGetIMEA(ptr ptr)
+@ stdcall ImmIMPGetIMEW(ptr ptr)
+@ stdcall ImmIMPQueryIMEA(ptr)
+@ stdcall ImmIMPQueryIMEW(ptr)
+@ stdcall ImmIMPSetIMEA(ptr ptr)
+@ stdcall ImmIMPSetIMEW(ptr ptr)
@ stdcall ImmInstallIMEA(str str)
@ stdcall ImmInstallIMEW(wstr wstr)
@ stdcall ImmIsIME(long)
@@ -89,8 +89,8 @@
@ stdcall ImmReleaseContext(ptr ptr)
@ stdcall ImmRequestMessageA(ptr long long)
@ stdcall ImmRequestMessageW(ptr long long)
-@ stdcall -stub ImmSendIMEMessageExA(ptr long)
-@ stdcall -stub ImmSendIMEMessageExW(ptr long)
+@ stdcall ImmSendIMEMessageExA(ptr ptr)
+@ stdcall ImmSendIMEMessageExW(ptr ptr)
@ stub ImmSendMessageToActiveDefImeWndW
@ stdcall ImmSetActiveContext(ptr ptr long)
@ stdcall ImmSetActiveContextConsoleIME(ptr long)
diff --git a/dll/win32/imm32/keymsg.c b/dll/win32/imm32/keymsg.c
index 6fe90bd26a2..6e35ae685f6 100644
--- a/dll/win32/imm32/keymsg.c
+++ b/dll/win32/imm32/keymsg.c
@@ -470,7 +470,7 @@ BOOL WINAPI ImmGenerateMessage(HIMC hIMC)
RtlCopyMemory(pTrans, pMsgs, cbTrans);
-#ifdef IMM_NT3_SUPPORT
+#ifdef IMM_WIN3_SUPPORT
if (GetWin32ClientInfo()->dwExpWinVer < _WIN32_WINNT_NT4) /* old version (3.x)?
*/
{
LANGID LangID = LANGIDFROMLCID(GetSystemDefaultLCID());
@@ -520,7 +520,7 @@ Imm32PostMessages(HWND hwnd, HIMC hIMC, DWORD dwCount, LPTRANSMSG
lpTransMsg)
bAnsi = !(pClientImc->dwFlags & CLIENTIMC_WIDE);
ImmUnlockClientImc(pClientImc);
-#ifdef IMM_NT3_SUPPORT
+#ifdef IMM_WIN3_SUPPORT
if (GetWin32ClientInfo()->dwExpWinVer < _WIN32_WINNT_NT4) /* old version (3.x)?
*/
{
LANGID LangID = LANGIDFROMLCID(GetSystemDefaultLCID());
@@ -555,7 +555,7 @@ Imm32PostMessages(HWND hwnd, HIMC hIMC, DWORD dwCount, LPTRANSMSG
lpTransMsg)
PostMessageW(hwnd, pItem->message, pItem->wParam, pItem->lParam);
}
-#ifdef IMM_NT3_SUPPORT
+#ifdef IMM_WIN3_SUPPORT
if (pNewTransMsg != lpTransMsg)
Imm32HeapFree(pNewTransMsg);
#endif
diff --git a/dll/win32/imm32/precomp.h b/dll/win32/imm32/precomp.h
index caaf30c1c09..4ca77e11fbf 100644
--- a/dll/win32/imm32/precomp.h
+++ b/dll/win32/imm32/precomp.h
@@ -23,6 +23,7 @@
#include <winuser.h>
#include <winnls.h>
#include <winreg.h>
+#include <winnls32.h>
#include <imm.h>
#include <ddk/imm.h>
diff --git a/dll/win32/imm32/utils.c b/dll/win32/imm32/utils.c
index 74c234a0eae..7024ec8f19f 100644
--- a/dll/win32/imm32/utils.c
+++ b/dll/win32/imm32/utils.c
@@ -425,3 +425,57 @@ DWORD WINAPI ImmGetIMCLockCount(HIMC hIMC)
ImmUnlockClientImc(pClientImc);
return ret;
}
+
+/***********************************************************************
+ * ImmIMPGetIMEA(IMM32.@)
+ */
+BOOL WINAPI ImmIMPGetIMEA(HWND hWnd, LPIMEPROA pImePro)
+{
+ FIXME("(%p, %p)\n", hWnd, pImePro);
+ return FALSE;
+}
+
+/***********************************************************************
+ * ImmIMPGetIMEW(IMM32.@)
+ */
+BOOL WINAPI ImmIMPGetIMEW(HWND hWnd, LPIMEPROW pImePro)
+{
+ FIXME("(%p, %p)\n", hWnd, pImePro);
+ return FALSE;
+}
+
+/***********************************************************************
+ * ImmIMPQueryIMEA(IMM32.@)
+ */
+BOOL WINAPI ImmIMPQueryIMEA(LPIMEPROA pImePro)
+{
+ FIXME("(%p)\n", pImePro);
+ return FALSE;
+}
+
+/***********************************************************************
+ * ImmIMPQueryIMEW(IMM32.@)
+ */
+BOOL WINAPI ImmIMPQueryIMEW(LPIMEPROW pImePro)
+{
+ FIXME("(%p)\n", pImePro);
+ return FALSE;
+}
+
+/***********************************************************************
+ * ImmIMPSetIMEA(IMM32.@)
+ */
+BOOL WINAPI ImmIMPSetIMEA(HWND hWnd, LPIMEPROA pImePro)
+{
+ FIXME("(%p, %p)\n", hWnd, pImePro);
+ return FALSE;
+}
+
+/***********************************************************************
+ * ImmIMPSetIMEW(IMM32.@)
+ */
+BOOL WINAPI ImmIMPSetIMEW(HWND hWnd, LPIMEPROW pImePro)
+{
+ FIXME("(%p, %p)\n", hWnd, pImePro);
+ return FALSE;
+}
diff --git a/dll/win32/imm32/nt3.c b/dll/win32/imm32/win3.c
similarity index 90%
rename from dll/win32/imm32/nt3.c
rename to dll/win32/imm32/win3.c
index e1e8b263311..bce492c9cb1 100644
--- a/dll/win32/imm32/nt3.c
+++ b/dll/win32/imm32/win3.c
@@ -1,7 +1,7 @@
/*
* PROJECT: ReactOS IMM32
* LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later)
- * PURPOSE: Implementing IMM32 NT3 compatibility
+ * PURPOSE: Implementing IMM32 Win3.x compatibility
* COPYRIGHT: Copyright 2020-2021 Katayama Hirofumi MZ
<katayama.hirofumi.mz(a)gmail.com>
*/
@@ -9,7 +9,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(imm);
-#ifdef IMM_NT3_SUPPORT /* 3.x support */
+#ifdef IMM_WIN3_SUPPORT /* 3.x support */
DWORD APIENTRY
ImmNt3JTransCompA(LPINPUTCONTEXTDX pIC, LPCOMPOSITIONSTRING pCS,
@@ -170,14 +170,14 @@ DoDefault:
return ret;
}
-static DWORD APIENTRY
+DWORD APIENTRY
ImmNt3KTrans(DWORD dwCount, LPTRANSMSG pEntries, LPINPUTCONTEXTDX pIC,
LPCOMPOSITIONSTRING pCS, BOOL bAnsi)
{
return dwCount; // FIXME
}
-static DWORD APIENTRY
+DWORD APIENTRY
ImmNt3Trans(DWORD dwCount, LPTRANSMSG pEntries, HIMC hIMC, BOOL bAnsi, WORD wLang)
{
BOOL ret = FALSE;
@@ -202,4 +202,22 @@ ImmNt3Trans(DWORD dwCount, LPTRANSMSG pEntries, HIMC hIMC, BOOL
bAnsi, WORD wLan
return ret;
}
-#endif /* IMM_NT3_SUPPORT */
+#endif /* IMM_WIN3_SUPPORT */
+
+/***********************************************************************
+ * ImmSendIMEMessageExA(IMM32.@)
+ */
+WORD WINAPI ImmSendIMEMessageExA(HWND hWnd, LPARAM lParam)
+{
+ FIXME("(%p, %p)\n", hWnd, lParam);
+ return 0;
+}
+
+/***********************************************************************
+ * ImmSendIMEMessageExW(IMM32.@)
+ */
+WORD WINAPI ImmSendIMEMessageExW(HWND hWnd, LPARAM lParam)
+{
+ FIXME("(%p, %p)\n", hWnd, lParam);
+ return 0;
+}