https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5afc3243599276d212e2a…
commit 5afc3243599276d212e2acc9fe28f0030eb36aa5
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Sun Jul 25 11:55:03 2021 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Sun Jul 25 11:55:03 2021 +0900
[IMM32] Improve ImmUnlockClientImc and Imm32HeapAlloc (#3834)
- Fix Imm32HeapAlloc function.
- Fix ImmUnlockClientImc function.
CORE-11700
---
dll/win32/imm32/imm.c | 6 +++---
sdk/include/reactos/imm32_undoc.h | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c
index dc62b77bfd2..904e0d25725 100644
--- a/dll/win32/imm32/imm.c
+++ b/dll/win32/imm32/imm.c
@@ -1017,7 +1017,7 @@ LPVOID APIENTRY Imm32HeapAlloc(DWORD dwFlags, DWORD dwBytes)
{
if (!g_hImm32Heap)
{
- g_hImm32Heap = GetProcessHeap(); // FIXME: Use TEB
+ g_hImm32Heap = RtlGetProcessHeap();
if (g_hImm32Heap == NULL)
return NULL;
}
@@ -1076,7 +1076,7 @@ PCLIENTIMC WINAPI ImmLockClientImc(HIMC hImc)
}
else
{
- if (pClientImc->dwFlags & CLIENTIMC_DISABLED)
+ if (pClientImc->dwFlags & CLIENTIMC_UNKNOWN1)
return NULL;
}
@@ -1092,7 +1092,7 @@ VOID WINAPI ImmUnlockClientImc(PCLIENTIMC pClientImc)
TRACE("ImmUnlockClientImc(%p)\n", pClientImc);
cLocks = InterlockedDecrement(&pClientImc->cLockObj);
- if (cLocks != 0 || (pClientImc->dwFlags & CLIENTIMC_DISABLED))
+ if (cLocks != 0 || !(pClientImc->dwFlags & CLIENTIMC_UNKNOWN1))
return;
hImc = pClientImc->hImc;
diff --git a/sdk/include/reactos/imm32_undoc.h b/sdk/include/reactos/imm32_undoc.h
index e207d52bc0e..a2b068fb058 100644
--- a/sdk/include/reactos/imm32_undoc.h
+++ b/sdk/include/reactos/imm32_undoc.h
@@ -21,9 +21,9 @@ typedef struct tagCLIENTIMC
} CLIENTIMC, *PCLIENTIMC;
/* flags for CLIENTIMC */
-#define CLIENTIMC_WIDE (1 << 0)
-#define CLIENTIMC_DISABLED (1 << 6)
-#define CLIENTIMC_UNKNOWN2 (1 << 8)
+#define CLIENTIMC_WIDE 0x1
+#define CLIENTIMC_UNKNOWN1 0x40
+#define CLIENTIMC_UNKNOWN2 0x100
#ifdef __cplusplus
extern "C" {