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; }