mirror of
https://github.com/reactos/reactos.git
synced 2025-05-22 02:25:18 +00:00
[MSCTF] Implement InitCUASFlag (#6235)
Implementing TIPs and Language Bar... JIRA issue: CORE-19361 - Add InitCUASFlag function. - Use it in ProcessAttach function.
This commit is contained in:
parent
ec0695c26b
commit
cfff2dbd12
1 changed files with 40 additions and 0 deletions
|
@ -45,6 +45,8 @@ HKL g_hklDefault = NULL;
|
||||||
DWORD g_dwTLSIndex = (DWORD)-1;
|
DWORD g_dwTLSIndex = (DWORD)-1;
|
||||||
BOOL gfSharedMemory = FALSE;
|
BOOL gfSharedMemory = FALSE;
|
||||||
LONG g_cRefDll = -1;
|
LONG g_cRefDll = -1;
|
||||||
|
BOOL g_fCUAS = FALSE;
|
||||||
|
TCHAR g_szCUASImeFile[16] = { 0 };
|
||||||
|
|
||||||
// Messages
|
// Messages
|
||||||
UINT g_msgPrivate = 0;
|
UINT g_msgPrivate = 0;
|
||||||
|
@ -484,6 +486,40 @@ VOID CheckAnchorStores(VOID)
|
||||||
//FIXME
|
//FIXME
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VOID InitCUASFlag(VOID)
|
||||||
|
{
|
||||||
|
CicRegKey regKey1;
|
||||||
|
LSTATUS error;
|
||||||
|
|
||||||
|
error = regKey1.Open(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\CTF\\SystemShared\\"));
|
||||||
|
if (error == ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
DWORD dwValue;
|
||||||
|
error = regKey1.QueryDword(TEXT("CUAS"), &dwValue);
|
||||||
|
if (error == ERROR_SUCCESS)
|
||||||
|
g_fCUAS = !!dwValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_szCUASImeFile[0] = TEXT('\0');
|
||||||
|
|
||||||
|
if (!g_fCUAS)
|
||||||
|
return;
|
||||||
|
|
||||||
|
TCHAR szImeFile[16];
|
||||||
|
CicRegKey regKey2;
|
||||||
|
error = regKey2.Open(HKEY_LOCAL_MACHINE,
|
||||||
|
TEXT("Software\\Microsoft\\Windows NT\\CurrentVersion\\IMM"));
|
||||||
|
if (error == ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
error = regKey2.QuerySz(TEXT("IME File"), szImeFile, _countof(szImeFile));
|
||||||
|
if (error == ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
g_szCUASImeFile[_countof(g_szCUASImeFile) - 1] = TEXT('\0'); // Avoid buffer overrun
|
||||||
|
StringCchCopy(g_szCUASImeFile, _countof(g_szCUASImeFile), szImeFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -541,6 +577,10 @@ BOOL ProcessAttach(HINSTANCE hinstDLL) // FIXME: Call me from DllMain
|
||||||
|
|
||||||
//FIXME
|
//FIXME
|
||||||
|
|
||||||
|
InitCUASFlag();
|
||||||
|
|
||||||
|
//FIXME
|
||||||
|
|
||||||
GetDesktopUniqueName(TEXT("CTF.AsmListCache.FMP"), g_szAsmListCache, _countof(g_szAsmListCache));
|
GetDesktopUniqueName(TEXT("CTF.AsmListCache.FMP"), g_szAsmListCache, _countof(g_szAsmListCache));
|
||||||
GetDesktopUniqueName(TEXT("CTF.TimListCache.FMP"), g_szTimListCache, _countof(g_szTimListCache));
|
GetDesktopUniqueName(TEXT("CTF.TimListCache.FMP"), g_szTimListCache, _countof(g_szTimListCache));
|
||||||
GetDesktopUniqueName(TEXT("CTF.LayoutsCache.FMP"), g_szLayoutsCache, _countof(g_szLayoutsCache));
|
GetDesktopUniqueName(TEXT("CTF.LayoutsCache.FMP"), g_szLayoutsCache, _countof(g_szLayoutsCache));
|
||||||
|
|
Loading…
Reference in a new issue