mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
- Implement a helper registry key opening function to reduce code size.
- http://www.tech-archive.net/Archive/Development/microsoft.public.development.device.drivers/2004-10/1623.html svn path=/trunk/; revision=31540
This commit is contained in:
parent
3cd13713b0
commit
68981a6100
2 changed files with 32 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue