mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 00:50:23 +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
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
RegWriteSZ(HKEY hkey, PWSTR pwszValue, PWSTR pwszData);
|
RegWriteSZ(HKEY hkey, PCWSTR pwszValue, PWSTR pwszData);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
RegWriteDWORD(HKEY hkey, PWSTR pwszValue, DWORD dwData);
|
RegWriteDWORD(HKEY hkey, PCWSTR pwszValue, DWORD dwData);
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
NTAPI
|
NTAPI
|
||||||
RegReadDWORD(HKEY hkey, PWSTR pwszValue, PDWORD pdwData);
|
RegReadDWORD(HKEY hkey, PCWSTR pwszValue, PDWORD pdwData);
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
NTAPI
|
NTAPI
|
||||||
RegGetSectionDWORD(LPCWSTR pszSection, LPWSTR pszValue, DWORD dwDefault);
|
RegGetSectionDWORD(LPCWSTR pszSection, PCWSTR pszValue, DWORD dwDefault);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
FASTCALL
|
FASTCALL
|
||||||
|
|
|
@ -21,12 +21,10 @@ BOOL FASTCALL UserIsDBCSEnabled(VOID)
|
||||||
|
|
||||||
BOOL FASTCALL UserIsIMMEnabled(VOID)
|
BOOL FASTCALL UserIsIMMEnabled(VOID)
|
||||||
{
|
{
|
||||||
static WCHAR s_szLoadIMM[] = L"LoadIMM";
|
|
||||||
|
|
||||||
if (NLS_MB_CODE_PAGE_TAG)
|
if (NLS_MB_CODE_PAGE_TAG)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
return !!RegGetSectionDWORD(L"IMM", s_szLoadIMM, TRUE);
|
return !!RegGetSectionDWORD(L"IMM", L"LoadIMM", FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL FASTCALL UserIsCiceroEnabled(VOID)
|
BOOL FASTCALL UserIsCiceroEnabled(VOID)
|
||||||
|
|
|
@ -120,12 +120,11 @@ RegQueryValue(
|
||||||
ExFreePoolWithTag(pInfo, TAG_TEMP);
|
ExFreePoolWithTag(pInfo, TAG_TEMP);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
RegWriteSZ(HKEY hkey, PWSTR pwszValue, PWSTR pwszData)
|
RegWriteSZ(HKEY hkey, PCWSTR pwszValue, PWSTR pwszData)
|
||||||
{
|
{
|
||||||
UNICODE_STRING ustrValue;
|
UNICODE_STRING ustrValue;
|
||||||
UNICODE_STRING ustrData;
|
UNICODE_STRING ustrData;
|
||||||
|
@ -137,7 +136,7 @@ RegWriteSZ(HKEY hkey, PWSTR pwszValue, PWSTR pwszData)
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
RegWriteDWORD(HKEY hkey, PWSTR pwszValue, DWORD dwData)
|
RegWriteDWORD(HKEY hkey, PCWSTR pwszValue, DWORD dwData)
|
||||||
{
|
{
|
||||||
UNICODE_STRING ustrValue;
|
UNICODE_STRING ustrValue;
|
||||||
|
|
||||||
|
@ -147,7 +146,7 @@ RegWriteDWORD(HKEY hkey, PWSTR pwszValue, DWORD dwData)
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
NTAPI
|
NTAPI
|
||||||
RegReadDWORD(HKEY hkey, PWSTR pwszValue, PDWORD pdwData)
|
RegReadDWORD(HKEY hkey, PCWSTR pwszValue, PDWORD pdwData)
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
ULONG cbSize = sizeof(DWORD);
|
ULONG cbSize = sizeof(DWORD);
|
||||||
|
@ -170,7 +169,7 @@ RegOpenSectionKey(
|
||||||
|
|
||||||
DWORD
|
DWORD
|
||||||
NTAPI
|
NTAPI
|
||||||
RegGetSectionDWORD(LPCWSTR pszSection, LPWSTR pszValue, DWORD dwDefault)
|
RegGetSectionDWORD(LPCWSTR pszSection, PCWSTR pszValue, DWORD dwDefault)
|
||||||
{
|
{
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
DWORD dwValue;
|
DWORD dwValue;
|
||||||
|
|
Loading…
Reference in a new issue