mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 06:32:56 +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)
|
if (!g_hImm32Heap)
|
||||||
{
|
{
|
||||||
g_hImm32Heap = GetProcessHeap(); // FIXME: Use TEB
|
g_hImm32Heap = RtlGetProcessHeap();
|
||||||
if (g_hImm32Heap == NULL)
|
if (g_hImm32Heap == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -1076,7 +1076,7 @@ PCLIENTIMC WINAPI ImmLockClientImc(HIMC hImc)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (pClientImc->dwFlags & CLIENTIMC_DISABLED)
|
if (pClientImc->dwFlags & CLIENTIMC_UNKNOWN1)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1092,7 +1092,7 @@ VOID WINAPI ImmUnlockClientImc(PCLIENTIMC pClientImc)
|
||||||
TRACE("ImmUnlockClientImc(%p)\n", pClientImc);
|
TRACE("ImmUnlockClientImc(%p)\n", pClientImc);
|
||||||
|
|
||||||
cLocks = InterlockedDecrement(&pClientImc->cLockObj);
|
cLocks = InterlockedDecrement(&pClientImc->cLockObj);
|
||||||
if (cLocks != 0 || (pClientImc->dwFlags & CLIENTIMC_DISABLED))
|
if (cLocks != 0 || !(pClientImc->dwFlags & CLIENTIMC_UNKNOWN1))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
hImc = pClientImc->hImc;
|
hImc = pClientImc->hImc;
|
||||||
|
|
|
@ -21,9 +21,9 @@ typedef struct tagCLIENTIMC
|
||||||
} CLIENTIMC, *PCLIENTIMC;
|
} CLIENTIMC, *PCLIENTIMC;
|
||||||
|
|
||||||
/* flags for CLIENTIMC */
|
/* flags for CLIENTIMC */
|
||||||
#define CLIENTIMC_WIDE (1 << 0)
|
#define CLIENTIMC_WIDE 0x1
|
||||||
#define CLIENTIMC_DISABLED (1 << 6)
|
#define CLIENTIMC_UNKNOWN1 0x40
|
||||||
#define CLIENTIMC_UNKNOWN2 (1 << 8)
|
#define CLIENTIMC_UNKNOWN2 0x100
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue