From 6c47d1fade26bee6cc417a53ec7b4334068fc315 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Sun, 15 Jan 2012 10:10:54 +0000 Subject: [PATCH] [PORTCLS] * Initializes object attributes with correct handle attributes. * Use the provided access rights and create options. See issue #5934 for more details. svn path=/trunk/; revision=54969 --- reactos/drivers/wdm/audio/backpln/portcls/registry.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/reactos/drivers/wdm/audio/backpln/portcls/registry.cpp b/reactos/drivers/wdm/audio/backpln/portcls/registry.cpp index 9b406022611..3226dc6e3ac 100644 --- a/reactos/drivers/wdm/audio/backpln/portcls/registry.cpp +++ b/reactos/drivers/wdm/audio/backpln/portcls/registry.cpp @@ -156,8 +156,8 @@ CRegistryKey::NewSubKey( return STATUS_INVALID_HANDLE; } - InitializeObjectAttributes(&Attributes, SubKeyName, 0, m_hKey, NULL); - Status = ZwCreateKey(&hKey, KEY_READ | KEY_WRITE, &Attributes, 0, NULL, 0, Disposition); + InitializeObjectAttributes(&Attributes, SubKeyName, OBJ_INHERIT | OBJ_CASE_INSENSITIVE | OBJ_OPENIF | OBJ_KERNEL_HANDLE, m_hKey, NULL); + Status = ZwCreateKey(&hKey, DesiredAccess, &Attributes, 0, NULL, CreateOptions, Disposition); if (!NT_SUCCESS(Status)) { DPRINT("CRegistryKey::NewSubKey failed with %x\n", Status); @@ -177,8 +177,6 @@ CRegistryKey::NewSubKey( return Status; } - *RegistrySubKey = (PREGISTRYKEY)RegistryKey; - DPRINT("CRegistryKey::NewSubKey RESULT %p\n", *RegistrySubKey); return STATUS_SUCCESS; }