mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[WIN32SS] Fix const-ness of registry helper functions (#6525)
Improve code quality. JIRA issue: CORE-19360 - Fix const-ness of the arguments of win32k registry helper functions. - Compact UserIsIMMEnabled function.
This commit is contained in:
parent
febb589e00
commit
3768f0893d
3 changed files with 9 additions and 12 deletions
|
@ -46,19 +46,19 @@ RegQueryValue(
|
|||
|
||||
VOID
|
||||
NTAPI
|
||||
RegWriteSZ(HKEY hkey, PWSTR pwszValue, PWSTR pwszData);
|
||||
RegWriteSZ(HKEY hkey, PCWSTR pwszValue, PWSTR pwszData);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
RegWriteDWORD(HKEY hkey, PWSTR pwszValue, DWORD dwData);
|
||||
RegWriteDWORD(HKEY hkey, PCWSTR pwszValue, DWORD dwData);
|
||||
|
||||
BOOL
|
||||
NTAPI
|
||||
RegReadDWORD(HKEY hkey, PWSTR pwszValue, PDWORD pdwData);
|
||||
RegReadDWORD(HKEY hkey, PCWSTR pwszValue, PDWORD pdwData);
|
||||
|
||||
DWORD
|
||||
NTAPI
|
||||
RegGetSectionDWORD(LPCWSTR pszSection, LPWSTR pszValue, DWORD dwDefault);
|
||||
RegGetSectionDWORD(LPCWSTR pszSection, PCWSTR pszValue, DWORD dwDefault);
|
||||
|
||||
VOID
|
||||
FASTCALL
|
||||
|
|
|
@ -21,12 +21,10 @@ BOOL FASTCALL UserIsDBCSEnabled(VOID)
|
|||
|
||||
BOOL FASTCALL UserIsIMMEnabled(VOID)
|
||||
{
|
||||
static WCHAR s_szLoadIMM[] = L"LoadIMM";
|
||||
|
||||
if (NLS_MB_CODE_PAGE_TAG)
|
||||
return TRUE;
|
||||
|
||||
return !!RegGetSectionDWORD(L"IMM", s_szLoadIMM, TRUE);
|
||||
return !!RegGetSectionDWORD(L"IMM", L"LoadIMM", FALSE);
|
||||
}
|
||||
|
||||
BOOL FASTCALL UserIsCiceroEnabled(VOID)
|
||||
|
|
|
@ -120,12 +120,11 @@ RegQueryValue(
|
|||
ExFreePoolWithTag(pInfo, TAG_TEMP);
|
||||
|
||||
return Status;
|
||||
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
RegWriteSZ(HKEY hkey, PWSTR pwszValue, PWSTR pwszData)
|
||||
RegWriteSZ(HKEY hkey, PCWSTR pwszValue, PWSTR pwszData)
|
||||
{
|
||||
UNICODE_STRING ustrValue;
|
||||
UNICODE_STRING ustrData;
|
||||
|
@ -137,7 +136,7 @@ RegWriteSZ(HKEY hkey, PWSTR pwszValue, PWSTR pwszData)
|
|||
|
||||
VOID
|
||||
NTAPI
|
||||
RegWriteDWORD(HKEY hkey, PWSTR pwszValue, DWORD dwData)
|
||||
RegWriteDWORD(HKEY hkey, PCWSTR pwszValue, DWORD dwData)
|
||||
{
|
||||
UNICODE_STRING ustrValue;
|
||||
|
||||
|
@ -147,7 +146,7 @@ RegWriteDWORD(HKEY hkey, PWSTR pwszValue, DWORD dwData)
|
|||
|
||||
BOOL
|
||||
NTAPI
|
||||
RegReadDWORD(HKEY hkey, PWSTR pwszValue, PDWORD pdwData)
|
||||
RegReadDWORD(HKEY hkey, PCWSTR pwszValue, PDWORD pdwData)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
ULONG cbSize = sizeof(DWORD);
|
||||
|
@ -170,7 +169,7 @@ RegOpenSectionKey(
|
|||
|
||||
DWORD
|
||||
NTAPI
|
||||
RegGetSectionDWORD(LPCWSTR pszSection, LPWSTR pszValue, DWORD dwDefault)
|
||||
RegGetSectionDWORD(LPCWSTR pszSection, PCWSTR pszValue, DWORD dwDefault)
|
||||
{
|
||||
HKEY hKey;
|
||||
DWORD dwValue;
|
||||
|
|
Loading…
Reference in a new issue