https://git.reactos.org/?p=reactos.git;a=commitdiff;h=46518ad6011ed41b4ade0…
commit 46518ad6011ed41b4ade04ada7cc6bed1eba28f5
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Tue Mar 29 18:02:25 2022 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Tue Mar 29 18:02:25 2022 +0900
[IMM32] Renaming: s/Imm32HeapAlloc/ImmLocalAlloc/
s/Imm32HeapFree/ImmLocalFree/
CORE-11700
---
dll/win32/imm32/compstr.c | 36 ++++++++++++++++++------------------
dll/win32/imm32/ime.c | 46 +++++++++++++++++++++++-----------------------
dll/win32/imm32/imm.c | 20 ++++++++++----------
dll/win32/imm32/keymsg.c | 30 +++++++++++++++---------------
dll/win32/imm32/precomp.h | 4 ++--
dll/win32/imm32/regword.c | 40 ++++++++++++++++++++--------------------
dll/win32/imm32/utils.c | 22 +++++++++++-----------
dll/win32/imm32/win3.c | 4 ++--
8 files changed, 101 insertions(+), 101 deletions(-)
diff --git a/dll/win32/imm32/compstr.c b/dll/win32/imm32/compstr.c
index b49b4a5db19..50f26af8bbb 100644
--- a/dll/win32/imm32/compstr.c
+++ b/dll/win32/imm32/compstr.c
@@ -582,7 +582,7 @@ Imm32SetCompositionStringAW(HIMC hIMC, DWORD dwIndex, LPVOID pComp,
DWORD dwComp
if (bAnsiClient)
{
cbCompNew = Imm32CompStrWideToAnsi(pComp, dwCompLen, NULL, 0,
uCodePage);
- pCompNew = Imm32HeapAlloc(0, cbCompNew);
+ pCompNew = ImmLocalAlloc(0, cbCompNew);
if (!pCompNew)
goto Quit;
@@ -591,7 +591,7 @@ Imm32SetCompositionStringAW(HIMC hIMC, DWORD dwIndex, LPVOID pComp,
DWORD dwComp
else
{
cbCompNew = Imm32CompStrAnsiToWide(pComp, dwCompLen, NULL, 0,
uCodePage);
- pCompNew = Imm32HeapAlloc(0, cbCompNew);
+ pCompNew = ImmLocalAlloc(0, cbCompNew);
if (!pCompNew)
goto Quit;
@@ -604,7 +604,7 @@ Imm32SetCompositionStringAW(HIMC hIMC, DWORD dwIndex, LPVOID pComp,
DWORD dwComp
if (bAnsiClient)
{
cbReadNew = Imm32CompStrWideToAnsi(pRead, dwReadLen, NULL, 0,
uCodePage);
- pReadNew = Imm32HeapAlloc(0, cbReadNew);
+ pReadNew = ImmLocalAlloc(0, cbReadNew);
if (!pReadNew)
goto Quit;
@@ -613,7 +613,7 @@ Imm32SetCompositionStringAW(HIMC hIMC, DWORD dwIndex, LPVOID pComp,
DWORD dwComp
else
{
cbReadNew = Imm32CompStrAnsiToWide(pRead, dwReadLen, NULL, 0,
uCodePage);
- pReadNew = Imm32HeapAlloc(0, cbReadNew);
+ pReadNew = ImmLocalAlloc(0, cbReadNew);
if (!pReadNew)
goto Quit;
@@ -631,7 +631,7 @@ Imm32SetCompositionStringAW(HIMC hIMC, DWORD dwIndex, LPVOID pComp,
DWORD dwComp
CS_StrW(pCS, CompStr),
CS_SizeW(pCS, CompStr),
NULL, 0, uCodePage);
- pCompNew = Imm32HeapAlloc(0, cbCompNew);
+ pCompNew = ImmLocalAlloc(0, cbCompNew);
if (!pCompNew)
goto Quit;
@@ -645,7 +645,7 @@ Imm32SetCompositionStringAW(HIMC hIMC, DWORD dwIndex, LPVOID pComp,
DWORD dwComp
CS_StrA(pCS, CompStr),
CS_SizeA(pCS, CompStr),
NULL, 0, uCodePage);
- pCompNew = Imm32HeapAlloc(0, cbCompNew);
+ pCompNew = ImmLocalAlloc(0, cbCompNew);
if (!pCompNew)
goto Quit;
@@ -663,7 +663,7 @@ Imm32SetCompositionStringAW(HIMC hIMC, DWORD dwIndex, LPVOID pComp,
DWORD dwComp
CS_StrW(pCS, CompReadStr),
CS_SizeW(pCS, CompReadStr),
NULL, 0, uCodePage);
- pReadNew = Imm32HeapAlloc(0, cbReadNew);
+ pReadNew = ImmLocalAlloc(0, cbReadNew);
if (!pReadNew)
goto Quit;
@@ -677,7 +677,7 @@ Imm32SetCompositionStringAW(HIMC hIMC, DWORD dwIndex, LPVOID pComp,
DWORD dwComp
CS_StrA(pCS, CompReadStr),
CS_SizeA(pCS, CompReadStr),
NULL, 0, uCodePage);
- pReadNew = Imm32HeapAlloc(0, cbReadNew);
+ pReadNew = ImmLocalAlloc(0, cbReadNew);
if (!pReadNew)
goto Quit;
@@ -695,7 +695,7 @@ Imm32SetCompositionStringAW(HIMC hIMC, DWORD dwIndex, LPVOID pComp,
DWORD dwComp
{
cbCompNew = Imm32CompClauseWideToAnsi(pComp, dwCompLen, CS_StrW(pCS,
CompStr),
NULL, 0, uCodePage);
- pCompNew = Imm32HeapAlloc(0, cbCompNew);
+ pCompNew = ImmLocalAlloc(0, cbCompNew);
if (!pCompNew)
goto Quit;
@@ -706,7 +706,7 @@ Imm32SetCompositionStringAW(HIMC hIMC, DWORD dwIndex, LPVOID pComp,
DWORD dwComp
{
cbCompNew = Imm32CompClauseAnsiToWide(pComp, dwCompLen, CS_StrA(pCS,
CompStr),
NULL, 0, uCodePage);
- pCompNew = Imm32HeapAlloc(0, cbCompNew);
+ pCompNew = ImmLocalAlloc(0, cbCompNew);
if (!pCompNew)
goto Quit;
@@ -721,7 +721,7 @@ Imm32SetCompositionStringAW(HIMC hIMC, DWORD dwIndex, LPVOID pComp,
DWORD dwComp
{
cbReadNew = Imm32CompClauseWideToAnsi(pRead, dwReadLen, CS_StrW(pCS,
CompReadStr),
NULL, 0, uCodePage);
- pReadNew = Imm32HeapAlloc(0, cbReadNew);
+ pReadNew = ImmLocalAlloc(0, cbReadNew);
if (!pReadNew)
goto Quit;
@@ -733,7 +733,7 @@ Imm32SetCompositionStringAW(HIMC hIMC, DWORD dwIndex, LPVOID pComp,
DWORD dwComp
{
cbReadNew = Imm32CompClauseAnsiToWide(pRead, dwReadLen, CS_StrA(pCS,
CompReadStr),
NULL, 0, uCodePage);
- pReadNew = Imm32HeapAlloc(0, cbReadNew);
+ pReadNew = ImmLocalAlloc(0, cbReadNew);
if (!pReadNew)
goto Quit;
@@ -750,7 +750,7 @@ Imm32SetCompositionStringAW(HIMC hIMC, DWORD dwIndex, LPVOID pComp,
DWORD dwComp
if (bAnsiClient)
{
cbCompNew = Imm32ReconvertAnsiFromWide(NULL, pComp, uCodePage);
- pCompNew = Imm32HeapAlloc(0, cbCompNew);
+ pCompNew = ImmLocalAlloc(0, cbCompNew);
if (!pCompNew)
goto Quit;
@@ -762,7 +762,7 @@ Imm32SetCompositionStringAW(HIMC hIMC, DWORD dwIndex, LPVOID pComp,
DWORD dwComp
else
{
cbCompNew = Imm32ReconvertWideFromAnsi(NULL, pComp, uCodePage);
- pCompNew = Imm32HeapAlloc(0, cbCompNew);
+ pCompNew = ImmLocalAlloc(0, cbCompNew);
if (!pCompNew)
goto Quit;
@@ -778,7 +778,7 @@ Imm32SetCompositionStringAW(HIMC hIMC, DWORD dwIndex, LPVOID pComp,
DWORD dwComp
if (bAnsiClient)
{
cbReadNew = Imm32ReconvertAnsiFromWide(NULL, pRead, uCodePage);
- pReadNew = Imm32HeapAlloc(0, cbReadNew);
+ pReadNew = ImmLocalAlloc(0, cbReadNew);
if (!pReadNew)
goto Quit;
@@ -790,7 +790,7 @@ Imm32SetCompositionStringAW(HIMC hIMC, DWORD dwIndex, LPVOID pComp,
DWORD dwComp
else
{
cbReadNew = Imm32ReconvertWideFromAnsi(NULL, pRead, uCodePage);
- pReadNew = Imm32HeapAlloc(0, cbReadNew);
+ pReadNew = ImmLocalAlloc(0, cbReadNew);
if (!pReadNew)
goto Quit;
@@ -836,8 +836,8 @@ Quit:
ImmUnlockIMCC(pIC->hCompStr);
if (pIC)
ImmUnlockIMC(hIMC);
- Imm32HeapFree(pCompNew);
- Imm32HeapFree(pReadNew);
+ ImmLocalFree(pCompNew);
+ ImmLocalFree(pReadNew);
ImmUnlockImeDpi(pImeDpi);
return ret;
}
diff --git a/dll/win32/imm32/ime.c b/dll/win32/imm32/ime.c
index ef18b027a77..eec07d540b8 100644
--- a/dll/win32/imm32/ime.c
+++ b/dll/win32/imm32/ime.c
@@ -229,7 +229,7 @@ PIMEDPI APIENTRY Ime32LoadImeDpi(HKL hKL, BOOL bLock)
return NULL;
}
- pImeDpiNew = Imm32HeapAlloc(HEAP_ZERO_MEMORY, sizeof(IMEDPI));
+ pImeDpiNew = ImmLocalAlloc(HEAP_ZERO_MEMORY, sizeof(IMEDPI));
if (pImeDpiNew == NULL)
return NULL;
@@ -244,7 +244,7 @@ PIMEDPI APIENTRY Ime32LoadImeDpi(HKL hKL, BOOL bLock)
if (!Imm32LoadImeInfo(&ImeInfoEx, pImeDpiNew))
{
- Imm32HeapFree(pImeDpiNew);
+ ImmLocalFree(pImeDpiNew);
return FALSE;
}
@@ -259,7 +259,7 @@ PIMEDPI APIENTRY Ime32LoadImeDpi(HKL hKL, BOOL bLock)
RtlLeaveCriticalSection(&g_csImeDpi);
Imm32FreeImeDpi(pImeDpiNew, FALSE);
- Imm32HeapFree(pImeDpiNew);
+ ImmLocalFree(pImeDpiNew);
return pImeDpiFound;
}
else
@@ -343,7 +343,7 @@ BOOL APIENTRY Imm32ReleaseIME(HKL hKL)
}
Imm32FreeImeDpi(pImeDpi0, TRUE);
- Imm32HeapFree(pImeDpi0);
+ ImmLocalFree(pImeDpi0);
Quit:
RtlLeaveCriticalSection(&g_csImeDpi);
@@ -422,7 +422,7 @@ Imm32GetImeMenuItemsAW(HIMC hIMC, DWORD dwFlags, DWORD dwType, LPVOID
lpImeParen
if (lpImeMenu)
{
cbTotal = ((dwSize / sizeof(IMEMENUITEMINFOA)) *
sizeof(IMEMENUITEMINFOW));
- pNewItems = Imm32HeapAlloc(0, cbTotal);
+ pNewItems = ImmLocalAlloc(0, cbTotal);
if (!pNewItems)
goto Quit;
}
@@ -435,7 +435,7 @@ Imm32GetImeMenuItemsAW(HIMC hIMC, DWORD dwFlags, DWORD dwType, LPVOID
lpImeParen
if (lpImeMenu)
{
cbTotal = ((dwSize / sizeof(IMEMENUITEMINFOW)) *
sizeof(IMEMENUITEMINFOA));
- pNewItems = Imm32HeapAlloc(0, cbTotal);
+ pNewItems = ImmLocalAlloc(0, cbTotal);
if (!pNewItems)
goto Quit;
}
@@ -489,7 +489,7 @@ Imm32GetImeMenuItemsAW(HIMC hIMC, DWORD dwFlags, DWORD dwType, LPVOID
lpImeParen
Quit:
if (pNewItems != lpImeMenu)
- Imm32HeapFree(pNewItems);
+ ImmLocalFree(pNewItems);
ImmUnlockImeDpi(pImeDpi);
ImmUnlockIMC(hIMC);
return ret;
@@ -516,8 +516,8 @@ HKL WINAPI ImmInstallIMEA(LPCSTR lpszIMEFileName, LPCSTR
lpszLayoutText)
hKL = ImmInstallIMEW(pszFileNameW, pszLayoutTextW);
Quit:
- Imm32HeapFree(pszFileNameW);
- Imm32HeapFree(pszLayoutTextW);
+ ImmLocalFree(pszFileNameW);
+ ImmLocalFree(pszLayoutTextW);
return hKL;
}
@@ -553,10 +553,10 @@ HKL WINAPI ImmInstallIMEW(LPCWSTR lpszIMEFileName, LPCWSTR
lpszLayoutText)
cLayouts = Imm32GetRegImes(NULL, 0);
if (cLayouts)
{
- pLayouts = Imm32HeapAlloc(0, cLayouts * sizeof(REG_IME));
+ pLayouts = ImmLocalAlloc(0, cLayouts * sizeof(REG_IME));
if (!pLayouts || !Imm32GetRegImes(pLayouts, cLayouts))
{
- Imm32HeapFree(pLayouts);
+ ImmLocalFree(pLayouts);
return NULL;
}
@@ -611,7 +611,7 @@ HKL WINAPI ImmInstallIMEW(LPCWSTR lpszIMEFileName, LPCWSTR
lpszLayoutText)
}
Quit:
- Imm32HeapFree(pLayouts);
+ ImmLocalFree(pLayouts);
return hNewKL;
}
@@ -788,7 +788,7 @@ VOID WINAPI ImmUnlockImeDpi(PIMEDPI pImeDpi)
}
Imm32FreeImeDpi(pImeDpi, TRUE);
- Imm32HeapFree(pImeDpi);
+ ImmLocalFree(pImeDpi);
RtlLeaveCriticalSection(&g_csImeDpi);
}
@@ -1520,7 +1520,7 @@ ImmGetConversionListA(HKL hKL, HIMC hIMC, LPCSTR pSrc,
LPCANDIDATELIST lpDst,
if (cb == 0)
goto Quit;
- pCL = Imm32HeapAlloc(0, cb);
+ pCL = ImmLocalAlloc(0, cb);
if (pCL == NULL)
goto Quit;
@@ -1531,8 +1531,8 @@ ImmGetConversionListA(HKL hKL, HIMC hIMC, LPCSTR pSrc,
LPCANDIDATELIST lpDst,
ret = CandidateListWideToAnsi(pCL, lpDst, dwBufLen, CP_ACP);
Quit:
- Imm32HeapFree(pszSrcW);
- Imm32HeapFree(pCL);
+ ImmLocalFree(pszSrcW);
+ ImmLocalFree(pCL);
ImmUnlockImeDpi(pImeDpi);
return ret;
}
@@ -1575,7 +1575,7 @@ ImmGetConversionListW(HKL hKL, HIMC hIMC, LPCWSTR pSrc,
LPCANDIDATELIST lpDst,
if (cb == 0)
goto Quit;
- pCL = Imm32HeapAlloc(0, cb);
+ pCL = ImmLocalAlloc(0, cb);
if (!pCL)
goto Quit;
@@ -1586,8 +1586,8 @@ ImmGetConversionListW(HKL hKL, HIMC hIMC, LPCWSTR pSrc,
LPCANDIDATELIST lpDst,
ret = CandidateListAnsiToWide(pCL, lpDst, dwBufLen, CP_ACP);
Quit:
- Imm32HeapFree(pszSrcA);
- Imm32HeapFree(pCL);
+ ImmLocalFree(pszSrcA);
+ ImmLocalFree(pCL);
ImmUnlockImeDpi(pImeDpi);
return ret;
}
@@ -1721,8 +1721,8 @@ DoIt:
SendMessageW(hWnd, WM_IME_SYSTEM, 0x1A, 0);
Quit:
- Imm32HeapFree(RegWordW.lpReading);
- Imm32HeapFree(RegWordW.lpWord);
+ ImmLocalFree(RegWordW.lpReading);
+ ImmLocalFree(RegWordW.lpWord);
ImmUnlockImeDpi(pImeDpi);
return ret;
}
@@ -1775,8 +1775,8 @@ DoIt:
SendMessageW(hWnd, WM_IME_SYSTEM, 0x1A, 0);
Quit:
- Imm32HeapFree(RegWordA.lpReading);
- Imm32HeapFree(RegWordA.lpWord);
+ ImmLocalFree(RegWordA.lpReading);
+ ImmLocalFree(RegWordA.lpWord);
ImmUnlockImeDpi(pImeDpi);
return ret;
}
diff --git a/dll/win32/imm32/imm.c b/dll/win32/imm32/imm.c
index dad6998d9e1..3dde6656739 100644
--- a/dll/win32/imm32/imm.c
+++ b/dll/win32/imm32/imm.c
@@ -136,7 +136,7 @@ BOOL WINAPI ImmFreeLayout(DWORD dwUnknown)
cKLs = GetKeyboardLayoutList(0, NULL);
if (cKLs)
{
- pList = Imm32HeapAlloc(0, cKLs * sizeof(HKL));
+ pList = ImmLocalAlloc(0, cKLs * sizeof(HKL));
if (pList == NULL)
return FALSE;
@@ -150,7 +150,7 @@ BOOL WINAPI ImmFreeLayout(DWORD dwUnknown)
}
}
- Imm32HeapFree(pList);
+ ImmLocalFree(pList);
}
StringCchPrintfW(szKBD, _countof(szKBD), L"%08X", LangID);
@@ -593,14 +593,14 @@ HIMC WINAPI ImmCreateContext(void)
if (!IS_IMM_MODE())
return NULL;
- pClientImc = Imm32HeapAlloc(HEAP_ZERO_MEMORY, sizeof(CLIENTIMC));
+ pClientImc = ImmLocalAlloc(HEAP_ZERO_MEMORY, sizeof(CLIENTIMC));
if (pClientImc == NULL)
return NULL;
hIMC = NtUserCreateInputContext((ULONG_PTR)pClientImc);
if (hIMC == NULL)
{
- Imm32HeapFree(pClientImc);
+ ImmLocalFree(pClientImc);
return NULL;
}
@@ -624,9 +624,9 @@ static VOID APIENTRY Imm32FreeImeStates(LPINPUTCONTEXTDX pIC)
for (pSubState = pState->pSubState; pSubState; pSubState = pSubStateNext)
{
pSubStateNext = pSubState->pNext;
- Imm32HeapFree(pSubState);
+ ImmLocalFree(pSubState);
}
- Imm32HeapFree(pState);
+ ImmLocalFree(pState);
}
}
@@ -913,7 +913,7 @@ PCLIENTIMC WINAPI ImmLockClientImc(HIMC hImc)
pClientImc = (PCLIENTIMC)pIMC->dwClientImcData;
if (!pClientImc)
{
- pClientImc = Imm32HeapAlloc(HEAP_ZERO_MEMORY, sizeof(CLIENTIMC));
+ pClientImc = ImmLocalAlloc(HEAP_ZERO_MEMORY, sizeof(CLIENTIMC));
if (!pClientImc)
return NULL;
@@ -923,7 +923,7 @@ PCLIENTIMC WINAPI ImmLockClientImc(HIMC hImc)
if (!NtUserUpdateInputContext(hImc, UIC_CLIENTIMCDATA, (DWORD_PTR)pClientImc))
{
- Imm32HeapFree(pClientImc);
+ ImmLocalFree(pClientImc);
return NULL;
}
@@ -958,7 +958,7 @@ VOID WINAPI ImmUnlockClientImc(PCLIENTIMC pClientImc)
LocalFree(hInputContext);
RtlDeleteCriticalSection(&pClientImc->cs);
- Imm32HeapFree(pClientImc);
+ ImmLocalFree(pClientImc);
}
static HIMC APIENTRY Imm32GetContextEx(HWND hWnd, DWORD dwContextFlags)
@@ -1117,7 +1117,7 @@ BOOL WINAPI ImmEnumInputContext(DWORD dwThreadId, IMCENUMPROC lpfn,
LPARAM lPara
break;
}
- Imm32HeapFree(phList);
+ ImmLocalFree(phList);
return ret;
}
diff --git a/dll/win32/imm32/keymsg.c b/dll/win32/imm32/keymsg.c
index a8dd1f93ced..412b9a07d69 100644
--- a/dll/win32/imm32/keymsg.c
+++ b/dll/win32/imm32/keymsg.c
@@ -281,7 +281,7 @@ static DWORD WINAPI Imm32UnknownProcess1Proc(LPVOID arg)
SendMessageTimeoutW(hwndDefIME, WM_IME_SYSTEM, uValue,
(LPARAM)pUnknown->hWnd,
SMTO_BLOCK | SMTO_ABORTIFHUNG, 5000, &lResult);
}
- Imm32HeapFree(pUnknown);
+ ImmLocalFree(pUnknown);
return FALSE;
}
@@ -304,7 +304,7 @@ LRESULT APIENTRY Imm32UnknownProcess1(HWND hWnd, BOOL fFlag)
return lResult;
}
- pUnknown1 = Imm32HeapAlloc(0, sizeof(IMM_UNKNOWN_PROCESS1));
+ pUnknown1 = ImmLocalAlloc(0, sizeof(IMM_UNKNOWN_PROCESS1));
if (!pUnknown1)
return 0;
@@ -428,9 +428,9 @@ Imm32ProcessRequest(HIMC hIMC, PWND pWnd, DWORD dwCommand, LPVOID
pData, BOOL bA
if (bAnsiAPI == bAnsiWnd)
goto DoIt;
if (bAnsiWnd)
- pTempData = Imm32HeapAlloc(0, sizeof(LOGFONTA));
+ pTempData = ImmLocalAlloc(0, sizeof(LOGFONTA));
else
- pTempData = Imm32HeapAlloc(0, sizeof(LOGFONTW));
+ pTempData = ImmLocalAlloc(0, sizeof(LOGFONTW));
if (!pTempData)
return 0;
break;
@@ -444,7 +444,7 @@ Imm32ProcessRequest(HIMC hIMC, PWND pWnd, DWORD dwCommand, LPVOID
pData, BOOL bA
else
ret = Imm32ReconvertWideFromAnsi(NULL, pData, uCodePage);
- pTempData = Imm32HeapAlloc(0, ret + sizeof(WCHAR));
+ pTempData = ImmLocalAlloc(0, ret + sizeof(WCHAR));
if (!pTempData)
return 0;
@@ -474,7 +474,7 @@ Imm32ProcessRequest(HIMC hIMC, PWND pWnd, DWORD dwCommand, LPVOID
pData, BOOL bA
if (!cchCompStr)
return 0;
- pCS = Imm32HeapAlloc(0, (cchCompStr + 1) * sizeof(CHAR));
+ pCS = ImmLocalAlloc(0, (cchCompStr + 1) * sizeof(CHAR));
if (!pCS)
return 0;
@@ -487,7 +487,7 @@ Imm32ProcessRequest(HIMC hIMC, PWND pWnd, DWORD dwCommand, LPVOID
pData, BOOL bA
if (!cchCompStr)
return 0;
- pCS = Imm32HeapAlloc(0, (cchCompStr + 1) * sizeof(WCHAR));
+ pCS = ImmLocalAlloc(0, (cchCompStr + 1) * sizeof(WCHAR));
if (!pCS)
return 0;
@@ -495,7 +495,7 @@ Imm32ProcessRequest(HIMC hIMC, PWND pWnd, DWORD dwCommand, LPVOID
pData, BOOL bA
pICP->dwCharPos = IchAnsiFromWide(pICP->dwCharPos, pCS,
uCodePage);
}
- Imm32HeapFree(pCS);
+ ImmLocalFree(pCS);
break;
default:
@@ -552,7 +552,7 @@ DoIt:
Quit:
if (pTempData != pData)
- Imm32HeapFree(pTempData);
+ ImmLocalFree(pTempData);
return ret;
}
@@ -810,7 +810,7 @@ BOOL WINAPI ImmGenerateMessage(HIMC hIMC)
goto Quit;
cbTrans = dwCount * sizeof(TRANSMSG);
- pTrans = Imm32HeapAlloc(0, cbTrans);
+ pTrans = ImmLocalAlloc(0, cbTrans);
if (pTrans == NULL)
goto Quit;
@@ -843,7 +843,7 @@ BOOL WINAPI ImmGenerateMessage(HIMC hIMC)
}
Quit:
- Imm32HeapFree(pTrans);
+ ImmLocalFree(pTrans);
if (hMsgBuf)
ImmUnlockIMCC(hMsgBuf);
pIC->dwNumMsgBuf = 0; /* done */
@@ -877,7 +877,7 @@ Imm32PostMessages(HWND hwnd, HIMC hIMC, DWORD dwCount, LPTRANSMSG
lpTransMsg)
(Lang == LANG_KOREAN && NtUserGetAppImeLevel(hwnd) == 3))
{
DWORD cbTransMsg = dwCount * sizeof(TRANSMSG);
- pNewTransMsg = Imm32HeapAlloc(0, cbTransMsg);
+ pNewTransMsg = ImmLocalAlloc(0, cbTransMsg);
if (pNewTransMsg)
{
RtlCopyMemory(pNewTransMsg, lpTransMsg, cbTransMsg);
@@ -903,7 +903,7 @@ Imm32PostMessages(HWND hwnd, HIMC hIMC, DWORD dwCount, LPTRANSMSG
lpTransMsg)
#ifdef IMM_WIN3_SUPPORT
if (pNewTransMsg != lpTransMsg)
- Imm32HeapFree(pNewTransMsg);
+ ImmLocalFree(pNewTransMsg);
#endif
}
@@ -997,7 +997,7 @@ BOOL WINAPI ImmTranslateMessage(HWND hwnd, UINT msg, WPARAM wParam,
LPARAM lKeyD
/* allocate a list */
cbList = offsetof(TRANSMSGLIST, TransMsg) + MSG_COUNT * sizeof(TRANSMSG);
- pList = Imm32HeapAlloc(0, cbList);
+ pList = ImmLocalAlloc(0, cbList);
if (!pList)
goto Quit;
@@ -1023,7 +1023,7 @@ BOOL WINAPI ImmTranslateMessage(HWND hwnd, UINT msg, WPARAM wParam,
LPARAM lKeyD
}
Quit:
- Imm32HeapFree(pList);
+ ImmLocalFree(pList);
ImmUnlockImeDpi(pImeDpi);
ImmUnlockIMC(hIMC);
ImmReleaseContext(hwnd, hIMC);
diff --git a/dll/win32/imm32/precomp.h b/dll/win32/imm32/precomp.h
index e525475f352..07c5c6af4ba 100644
--- a/dll/win32/imm32/precomp.h
+++ b/dll/win32/imm32/precomp.h
@@ -84,8 +84,8 @@ PWND FASTCALL ValidateHwndNoErr(HWND hwnd);
LPVOID FASTCALL ValidateHandleNoErr(HANDLE hObject, UINT uType);
BOOL APIENTRY Imm32CheckImcProcess(PIMC pIMC);
-LPVOID APIENTRY Imm32HeapAlloc(DWORD dwFlags, DWORD dwBytes);
-#define Imm32HeapFree(lpData) HeapFree(pImmHeap, 0, (lpData))
+LPVOID APIENTRY ImmLocalAlloc(DWORD dwFlags, DWORD dwBytes);
+#define ImmLocalFree(lpData) HeapFree(pImmHeap, 0, (lpData))
LPWSTR APIENTRY Imm32WideFromAnsi(LPCSTR pszA);
LPSTR APIENTRY Imm32AnsiFromWide(LPCWSTR pszW);
diff --git a/dll/win32/imm32/regword.c b/dll/win32/imm32/regword.c
index cf038a2edcc..32148e11e6b 100644
--- a/dll/win32/imm32/regword.c
+++ b/dll/win32/imm32/regword.c
@@ -51,8 +51,8 @@ Imm32EnumWordProcA2W(LPCSTR pszReadingA, DWORD dwStyle, LPCSTR
pszRegisterA, LPV
lpEnumData->ret = ret;
Quit:
- Imm32HeapFree(pszReadingW);
- Imm32HeapFree(pszRegisterW);
+ ImmLocalFree(pszReadingW);
+ ImmLocalFree(pszRegisterW);
return ret;
}
@@ -81,8 +81,8 @@ Imm32EnumWordProcW2A(LPCWSTR pszReadingW, DWORD dwStyle, LPCWSTR
pszRegisterW, L
lpEnumData->ret = ret;
Quit:
- Imm32HeapFree(pszReadingA);
- Imm32HeapFree(pszRegisterA);
+ ImmLocalFree(pszReadingA);
+ ImmLocalFree(pszRegisterA);
return ret;
}
@@ -136,8 +136,8 @@ ImmEnumRegisterWordA(HKL hKL, REGISTERWORDENUMPROCA lpfnEnumProc,
ret = EnumDataW2A.ret;
Quit:
- Imm32HeapFree(pszReadingW);
- Imm32HeapFree(pszRegisterW);
+ ImmLocalFree(pszReadingW);
+ ImmLocalFree(pszRegisterW);
ImmUnlockImeDpi(pImeDpi);
return ret;
}
@@ -192,8 +192,8 @@ ImmEnumRegisterWordW(HKL hKL, REGISTERWORDENUMPROCW lpfnEnumProc,
ret = EnumDataA2W.ret;
Quit:
- Imm32HeapFree(pszReadingA);
- Imm32HeapFree(pszRegisterA);
+ ImmLocalFree(pszReadingA);
+ ImmLocalFree(pszRegisterA);
ImmUnlockImeDpi(pImeDpi);
return ret;
}
@@ -224,7 +224,7 @@ UINT WINAPI ImmGetRegisterWordStyleA(HKL hKL, UINT nItem, LPSTYLEBUFA
lpStyleBuf
if (nItem > 0)
{
- pNewStylesW = Imm32HeapAlloc(0, nItem * sizeof(STYLEBUFW));
+ pNewStylesW = ImmLocalAlloc(0, nItem * sizeof(STYLEBUFW));
if (!pNewStylesW)
goto Quit;
}
@@ -251,7 +251,7 @@ UINT WINAPI ImmGetRegisterWordStyleA(HKL hKL, UINT nItem, LPSTYLEBUFA
lpStyleBuf
}
Quit:
- Imm32HeapFree(pNewStylesW);
+ ImmLocalFree(pNewStylesW);
ImmUnlockImeDpi(pImeDpi);
return ret;
}
@@ -282,7 +282,7 @@ UINT WINAPI ImmGetRegisterWordStyleW(HKL hKL, UINT nItem, LPSTYLEBUFW
lpStyleBuf
if (nItem > 0)
{
- pNewStylesA = Imm32HeapAlloc(0, nItem * sizeof(STYLEBUFA));
+ pNewStylesA = ImmLocalAlloc(0, nItem * sizeof(STYLEBUFA));
if (!pNewStylesA)
goto Quit;
}
@@ -308,7 +308,7 @@ UINT WINAPI ImmGetRegisterWordStyleW(HKL hKL, UINT nItem, LPSTYLEBUFW
lpStyleBuf
}
Quit:
- Imm32HeapFree(pNewStylesA);
+ ImmLocalFree(pNewStylesA);
ImmUnlockImeDpi(pImeDpi);
return ret;
}
@@ -354,8 +354,8 @@ ImmRegisterWordA(HKL hKL, LPCSTR lpszReading, DWORD dwStyle, LPCSTR
lpszRegister
ret = pImeDpi->ImeRegisterWord(pszReadingW, dwStyle, pszRegisterW);
Quit:
- Imm32HeapFree(pszReadingW);
- Imm32HeapFree(pszRegisterW);
+ ImmLocalFree(pszReadingW);
+ ImmLocalFree(pszRegisterW);
ImmUnlockImeDpi(pImeDpi);
return ret;
}
@@ -401,8 +401,8 @@ ImmRegisterWordW(HKL hKL, LPCWSTR lpszReading, DWORD dwStyle, LPCWSTR
lpszRegist
ret = pImeDpi->ImeRegisterWord(pszReadingA, dwStyle, pszRegisterA);
Quit:
- Imm32HeapFree(pszReadingA);
- Imm32HeapFree(pszRegisterA);
+ ImmLocalFree(pszReadingA);
+ ImmLocalFree(pszRegisterA);
ImmUnlockImeDpi(pImeDpi);
return ret;
}
@@ -448,8 +448,8 @@ ImmUnregisterWordA(HKL hKL, LPCSTR lpszReading, DWORD dwStyle, LPCSTR
lpszUnregi
ret = pImeDpi->ImeUnregisterWord(pszReadingW, dwStyle, pszUnregisterW);
Quit:
- Imm32HeapFree(pszReadingW);
- Imm32HeapFree(pszUnregisterW);
+ ImmLocalFree(pszReadingW);
+ ImmLocalFree(pszUnregisterW);
ImmUnlockImeDpi(pImeDpi);
return ret;
}
@@ -495,8 +495,8 @@ ImmUnregisterWordW(HKL hKL, LPCWSTR lpszReading, DWORD dwStyle,
LPCWSTR lpszUnre
ret = pImeDpi->ImeUnregisterWord(pszReadingA, dwStyle, pszUnregisterA);
Quit:
- Imm32HeapFree(pszReadingA);
- Imm32HeapFree(pszUnregisterA);
+ ImmLocalFree(pszReadingA);
+ ImmLocalFree(pszUnregisterA);
ImmUnlockImeDpi(pImeDpi);
return ret;
}
diff --git a/dll/win32/imm32/utils.c b/dll/win32/imm32/utils.c
index 91434297f14..2e5ffc4f301 100644
--- a/dll/win32/imm32/utils.c
+++ b/dll/win32/imm32/utils.c
@@ -63,7 +63,7 @@ BOOL WINAPI Imm32IsImcAnsi(HIMC hIMC)
LPWSTR APIENTRY Imm32WideFromAnsi(LPCSTR pszA)
{
INT cch = lstrlenA(pszA);
- LPWSTR pszW = Imm32HeapAlloc(0, (cch + 1) * sizeof(WCHAR));
+ LPWSTR pszW = ImmLocalAlloc(0, (cch + 1) * sizeof(WCHAR));
if (pszW == NULL)
return NULL;
cch = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, pszA, cch, pszW, cch + 1);
@@ -75,7 +75,7 @@ LPSTR APIENTRY Imm32AnsiFromWide(LPCWSTR pszW)
{
INT cchW = lstrlenW(pszW);
INT cchA = (cchW + 1) * sizeof(WCHAR);
- LPSTR pszA = Imm32HeapAlloc(0, cchA);
+ LPSTR pszA = ImmLocalAlloc(0, cchA);
if (!pszA)
return NULL;
cchA = WideCharToMultiByte(CP_ACP, 0, pszW, cchW, pszA, cchA, NULL, NULL);
@@ -219,7 +219,7 @@ BOOL APIENTRY Imm32CheckImcProcess(PIMC pIMC)
return dwProcessID == (DWORD_PTR)NtCurrentTeb()->ClientId.UniqueProcess;
}
-LPVOID APIENTRY Imm32HeapAlloc(DWORD dwFlags, DWORD dwBytes)
+LPVOID APIENTRY ImmLocalAlloc(DWORD dwFlags, DWORD dwBytes)
{
if (!pImmHeap)
{
@@ -270,18 +270,18 @@ DWORD APIENTRY Imm32AllocAndBuildHimcList(DWORD dwThreadId, HIMC
**pphList)
DWORD dwCount = INITIAL_COUNT, cRetry = 0;
HIMC *phNewList;
- phNewList = Imm32HeapAlloc(0, dwCount * sizeof(HIMC));
+ phNewList = ImmLocalAlloc(0, dwCount * sizeof(HIMC));
if (phNewList == NULL)
return 0;
Status = NtUserBuildHimcList(dwThreadId, dwCount, phNewList, &dwCount);
while (Status == STATUS_BUFFER_TOO_SMALL)
{
- Imm32HeapFree(phNewList);
+ ImmLocalFree(phNewList);
if (cRetry++ >= MAX_RETRY)
return 0;
- phNewList = Imm32HeapAlloc(0, dwCount * sizeof(HIMC));
+ phNewList = ImmLocalAlloc(0, dwCount * sizeof(HIMC));
if (phNewList == NULL)
return 0;
@@ -290,7 +290,7 @@ DWORD APIENTRY Imm32AllocAndBuildHimcList(DWORD dwThreadId, HIMC
**pphList)
if (NT_ERROR(Status) || !dwCount)
{
- Imm32HeapFree(phNewList);
+ ImmLocalFree(phNewList);
return 0;
}
@@ -361,7 +361,7 @@ Imm32FetchImeState(LPINPUTCONTEXTDX pIC, HKL hKL)
}
if (!pState)
{
- pState = Imm32HeapAlloc(HEAP_ZERO_MEMORY, sizeof(IME_STATE));
+ pState = ImmLocalAlloc(HEAP_ZERO_MEMORY, sizeof(IME_STATE));
if (pState)
{
pState->wLang = Lang;
@@ -381,7 +381,7 @@ Imm32FetchImeSubState(PIME_STATE pState, HKL hKL)
if (pSubState->hKL == hKL)
return pSubState;
}
- pSubState = Imm32HeapAlloc(0, sizeof(IME_SUBSTATE));
+ pSubState = ImmLocalAlloc(0, sizeof(IME_SUBSTATE));
if (!pSubState)
return NULL;
pSubState->dwValue = 0;
@@ -650,7 +650,7 @@ BOOL APIENTRY Imm32LoadImeVerInfo(PIMEINFOEX pImeInfoEx)
if (!cbVerInfo)
goto Quit;
- pVerInfo = Imm32HeapAlloc(0, cbVerInfo);
+ pVerInfo = ImmLocalAlloc(0, cbVerInfo);
if (!pVerInfo)
goto Quit;
@@ -661,7 +661,7 @@ BOOL APIENTRY Imm32LoadImeVerInfo(PIMEINFOEX pImeInfoEx)
ret = Imm32LoadImeLangAndDesc(pImeInfoEx, pVerInfo);
}
- Imm32HeapFree(pVerInfo);
+ ImmLocalFree(pVerInfo);
Quit:
if (bLoaded)
diff --git a/dll/win32/imm32/win3.c b/dll/win32/imm32/win3.c
index bce492c9cb1..43bb2abadb4 100644
--- a/dll/win32/imm32/win3.c
+++ b/dll/win32/imm32/win3.c
@@ -49,7 +49,7 @@ ImmNt3JTrans(DWORD dwCount, LPTRANSMSG pTrans, LPINPUTCONTEXTDX pIC,
// clone the message list
cbTempList = (dwCount + 1) * sizeof(TRANSMSG);
- pTempList = Imm32HeapAlloc(HEAP_ZERO_MEMORY, cbTempList);
+ pTempList = ImmLocalAlloc(HEAP_ZERO_MEMORY, cbTempList);
if (pTempList == NULL)
return 0;
RtlCopyMemory(pTempList, pTrans, dwCount * sizeof(TRANSMSG));
@@ -166,7 +166,7 @@ DoDefault:
}
}
- Imm32HeapFree(pTempList);
+ ImmLocalFree(pTempList);
return ret;
}