[NTOSKRNL]

IoRegisterPlugPlayNotification: Do not fail if no Interface can be found for the given GUID. Just do not call the Callback-Routine in this case. The Interface could be created later.

svn path=/trunk/; revision=48896
This commit is contained in:
Eric Kohl 2010-09-25 21:49:15 +00:00
parent d695e74a70
commit 1f2f04ed9b

View file

@ -290,15 +290,8 @@ IoRegisterPlugPlayNotification(IN IO_NOTIFICATION_EVENT_CATEGORY EventCategory,
NULL, /* PhysicalDeviceObject OPTIONAL */
0, /* Flags */
&SymbolicLinkList);
if (!NT_SUCCESS(Status))
if (NT_SUCCESS(Status))
{
DPRINT("IoGetDeviceInterfaces() failed with status 0x%08lx\n",
Status);
ExFreePoolWithTag(Entry, TAG_PNP_NOTIFY);
ObDereferenceObject(DriverObject);
return Status;
}
/* Enumerate SymbolicLinkList */
NotificationInfos.Version = 1;
NotificationInfos.Size = sizeof(DEVICE_INTERFACE_CHANGE_NOTIFICATION);
@ -321,6 +314,7 @@ IoRegisterPlugPlayNotification(IN IO_NOTIFICATION_EVENT_CATEGORY EventCategory,
ExFreePool(SymbolicLinkList);
}
}
Entry->PnpNotificationProc = CallbackRoutine;
Entry->EventCategory = EventCategory;