NTSTATUS
NTAPI
IopCreateDeviceKeyPath(IN PCUNICODE_STRING RegistryPath,
+ IN ULONG CreateOptions,
OUT PHANDLE Handle);
PDEVICE_NODE
}
}
- Status = IopCreateDeviceKeyPath(&DeviceNode->InstancePath, &InstanceHandle);
+ Status = IopCreateDeviceKeyPath(&DeviceNode->InstancePath, 0, &InstanceHandle);
if (!NT_SUCCESS(Status))
return Status;
}
/* Create the device key for legacy drivers */
- Status = IopCreateDeviceKeyPath(&Node->InstancePath, &InstanceHandle);
+ Status = IopCreateDeviceKeyPath(&Node->InstancePath, REG_OPTION_VOLATILE, &InstanceHandle);
if (!NT_SUCCESS(Status))
{
ZwClose(InstanceHandle);
NTSTATUS
NTAPI
IopCreateDeviceKeyPath(IN PCUNICODE_STRING RegistryPath,
+ IN ULONG CreateOptions,
OUT PHANDLE Handle)
{
UNICODE_STRING EnumU = RTL_CONSTANT_STRING(ENUM_ROOT);
&ObjectAttributes,
0,
NULL,
- 0,
+ CreateOptions,
NULL);
/* Close parent key handle, we don't need it anymore */
/*
* Create registry key for the instance id, if it doesn't exist yet
*/
- Status = IopCreateDeviceKeyPath(&DeviceNode->InstancePath, &InstanceKey);
+ Status = IopCreateDeviceKeyPath(&DeviceNode->InstancePath, 0, &InstanceKey);
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to create the instance key! (Status %lx)\n", Status);
NTSTATUS
NTAPI
IopCreateDeviceKeyPath(IN PCUNICODE_STRING RegistryPath,
+ IN ULONG CreateOptions,
OUT PHANDLE Handle);
NTSTATUS
IopActionConfigureChildServices(DeviceNode, DeviceNode->Parent);
/* Open a handle to the instance path key */
- Status = IopCreateDeviceKeyPath(&DeviceNode->InstancePath, &InstanceKey);
+ Status = IopCreateDeviceKeyPath(&DeviceNode->InstancePath, 0, &InstanceKey);
if (!NT_SUCCESS(Status))
return Status;
if (NT_SUCCESS(Status))
{
InitializeObjectAttributes(&ObjectAttributes, &Device->DeviceID, OBJ_CASE_INSENSITIVE, EnumHandle, NULL);
- Status = ZwCreateKey(&DeviceKeyHandle, KEY_SET_VALUE, &ObjectAttributes, 0, NULL, 0, NULL);
+ Status = ZwCreateKey(&DeviceKeyHandle, KEY_SET_VALUE, &ObjectAttributes, 0, NULL, REG_OPTION_VOLATILE, NULL);
ZwClose(EnumHandle);
}