mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 01:35:47 +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
|
NTSTATUS
|
||||||
IopInitializePnpServices(
|
IopInitializePnpServices(
|
||||||
IN PDEVICE_NODE DeviceNode,
|
IN PDEVICE_NODE DeviceNode,
|
||||||
IN BOOLEAN BootDrivers)
|
IN BOOLEAN BootDrivers);
|
||||||
;
|
|
||||||
|
NTSTATUS
|
||||||
|
IopOpenRegistryKeyEx(
|
||||||
|
PHANDLE KeyHandle,
|
||||||
|
HANDLE ParentKey,
|
||||||
|
PUNICODE_STRING Name,
|
||||||
|
ACCESS_MASK DesiredAccess);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Initialization Routines
|
// 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
|
static NTSTATUS INIT_FUNCTION
|
||||||
NTAPI
|
NTAPI
|
||||||
PnpDriverInitializeEmpty(IN struct _DRIVER_OBJECT *DriverObject, IN PUNICODE_STRING RegistryPath)
|
PnpDriverInitializeEmpty(IN struct _DRIVER_OBJECT *DriverObject, IN PUNICODE_STRING RegistryPath)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue