mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[IMM32] Improve ImmUnlockClientImc and Imm32HeapAlloc (#3834)
- Fix Imm32HeapAlloc function. - Fix ImmUnlockClientImc function. CORE-11700
This commit is contained in:
parent
f2bc1f0e11
commit
5afc324359
2 changed files with 6 additions and 6 deletions
|
@ -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;
|
||||
|
|
|
@ -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" {
|
||||
|
|
Loading…
Reference in a new issue