diff --git a/reactos/ntoskrnl/include/internal/io.h b/reactos/ntoskrnl/include/internal/io.h index a7bddc70314..b7afeac0ce8 100644 --- a/reactos/ntoskrnl/include/internal/io.h +++ b/reactos/ntoskrnl/include/internal/io.h @@ -556,8 +556,14 @@ IopQueueTargetDeviceEvent( NTSTATUS IopInitializePnpServices( IN PDEVICE_NODE DeviceNode, - IN BOOLEAN BootDrivers) -; + IN BOOLEAN BootDrivers); + +NTSTATUS +IopOpenRegistryKeyEx( + PHANDLE KeyHandle, + HANDLE ParentKey, + PUNICODE_STRING Name, + ACCESS_MASK DesiredAccess); // // Initialization Routines diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index d5fdb9b1525..5a70dacaeef 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -3303,6 +3303,30 @@ IopUpdateRootKey(VOID) } } +NTSTATUS +IopOpenRegistryKeyEx(PHANDLE KeyHandle, + HANDLE ParentKey, + PUNICODE_STRING Name, + ACCESS_MASK DesiredAccess) +{ + OBJECT_ATTRIBUTES ObjectAttributes; + NTSTATUS Status; + + PAGED_CODE(); + + *KeyHandle = NULL; + + InitializeObjectAttributes(&ObjectAttributes, + Name, + OBJ_CASE_INSENSITIVE | OBJ_KERNEL_HANDLE, + ParentKey, + NULL); + + Status = ZwOpenKey(KeyHandle, DesiredAccess, &ObjectAttributes); + + return Status; +} + static NTSTATUS INIT_FUNCTION NTAPI PnpDriverInitializeEmpty(IN struct _DRIVER_OBJECT *DriverObject, IN PUNICODE_STRING RegistryPath)