mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[NTOSKRNL]
- Also create the instance key when we create a new device object svn path=/trunk/; revision=53253
This commit is contained in:
parent
4f39606d60
commit
ee731ff6d9
1 changed files with 13 additions and 1 deletions
|
@ -142,7 +142,7 @@ PnpRootCreateDevice(
|
|||
UNICODE_STRING PathSep = RTL_CONSTANT_STRING(L"\\");
|
||||
ULONG NextInstance;
|
||||
UNICODE_STRING EnumKeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\" REGSTR_PATH_SYSTEMENUM);
|
||||
HANDLE EnumHandle, DeviceKeyHandle = INVALID_HANDLE_VALUE;
|
||||
HANDLE EnumHandle, DeviceKeyHandle = INVALID_HANDLE_VALUE, InstanceKeyHandle;
|
||||
RTL_QUERY_REGISTRY_TABLE QueryTable[2];
|
||||
OBJECT_ATTRIBUTES ObjectAttributes;
|
||||
|
||||
|
@ -241,6 +241,18 @@ tryagain:
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Finish creating the instance path in the registry */
|
||||
InitializeObjectAttributes(&ObjectAttributes, &Device->InstanceID, OBJ_CASE_INSENSITIVE, DeviceKeyHandle, NULL);
|
||||
Status = ZwCreateKey(&InstanceKeyHandle, KEY_QUERY_VALUE, &ObjectAttributes, 0, NULL, REG_OPTION_VOLATILE, NULL);
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("Failed to create instance path (0x%x)\n", Status);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Just close the handle */
|
||||
ZwClose(InstanceKeyHandle);
|
||||
|
||||
if (FullInstancePath)
|
||||
{
|
||||
FullInstancePath->MaximumLength = Device->DeviceID.Length + PathSep.Length + Device->InstanceID.Length;
|
||||
|
|
Loading…
Reference in a new issue