https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5a1af6ccd8ec136a181c9…
commit 5a1af6ccd8ec136a181c957b176139f8c42f73e3
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sun Jun 11 23:47:11 2017 +0000
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Thu Oct 25 00:58:21 2018 +0200
[USETUP] Explicitly use the REG_OPTION_(NON_)VOLATILE flags in NtCreateKey calls.
svn path=/branches/setup_improvements/; revision=75007
---
base/setup/usetup/devinst.c | 4 ++--
base/setup/usetup/mui.c | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/base/setup/usetup/devinst.c b/base/setup/usetup/devinst.c
index b1e4baf64f..bd9af3a357 100644
--- a/base/setup/usetup/devinst.c
+++ b/base/setup/usetup/devinst.c
@@ -98,7 +98,7 @@ InstallDriver(
/* Create service key */
RtlInitUnicodeString(&StringU, Driver);
InitializeObjectAttributes(&ObjectAttributes, &StringU, 0, hServices, NULL);
- Status = NtCreateKey(&hService, KEY_SET_VALUE, &ObjectAttributes, 0, NULL, 0,
&Disposition);
+ Status = NtCreateKey(&hService, KEY_SET_VALUE, &ObjectAttributes, 0, NULL,
REG_OPTION_NON_VOLATILE, &Disposition);
if (!NT_SUCCESS(Status))
{
DPRINT1("NtCreateKey('%wZ') failed with status 0x%08x\n",
&StringU, Status);
@@ -342,7 +342,7 @@ EventThread(IN LPVOID lpParameter)
}
InitializeObjectAttributes(&ObjectAttributes, &ServicesU,
OBJ_CASE_INSENSITIVE, NULL, NULL);
- Status = NtCreateKey(&hServices, KEY_ALL_ACCESS, &ObjectAttributes, 0, NULL,
0, NULL);
+ Status = NtCreateKey(&hServices, KEY_ALL_ACCESS, &ObjectAttributes, 0, NULL,
REG_OPTION_NON_VOLATILE, NULL);
if (!NT_SUCCESS(Status))
{
DPRINT1("NtCreateKey('%wZ') failed with status 0x%08lx\n",
&ServicesU, Status);
diff --git a/base/setup/usetup/mui.c b/base/setup/usetup/mui.c
index a983f0f47a..93b2feaff6 100644
--- a/base/setup/usetup/mui.c
+++ b/base/setup/usetup/mui.c
@@ -309,7 +309,7 @@ AddHotkeySettings(
&ObjectAttributes,
0,
NULL,
- 0,
+ REG_OPTION_NON_VOLATILE,
&Disposition);
if(!NT_SUCCESS(Status))
@@ -401,7 +401,7 @@ AddKbLayoutsToRegistry(
&ObjectAttributes,
0,
NULL,
- 0,
+ REG_OPTION_NON_VOLATILE,
&Disposition);
if(NT_SUCCESS(Status))
@@ -433,7 +433,7 @@ AddKbLayoutsToRegistry(
&ObjectAttributes,
0,
NULL,
- 0,
+ REG_OPTION_NON_VOLATILE,
&Disposition);
if (!NT_SUCCESS(Status))
@@ -454,7 +454,7 @@ AddKbLayoutsToRegistry(
&ObjectAttributes,
0,
NULL,
- 0,
+ REG_OPTION_NON_VOLATILE,
&Disposition);
if(!NT_SUCCESS(Status))