Author: sginsberg Date: Mon Aug 18 08:31:33 2008 New Revision: 35428
URL: http://svn.reactos.org/svn/reactos?rev=35428&view=rev Log: - Implement IoReportTargetDeviceChange as a wrapper around the unimplemented IoReportTargetDeviceChangeAsynchronous
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpreport.c
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpreport.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnprepor... ============================================================================== --- trunk/reactos/ntoskrnl/io/pnpmgr/pnpreport.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpreport.c [iso-8859-1] Mon Aug 18 08:31:33 2008 @@ -119,8 +119,27 @@ IoReportTargetDeviceChange(IN PDEVICE_OBJECT PhysicalDeviceObject, IN PVOID NotificationStructure) { - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + KEVENT Event; + NTSTATUS Status; + + /* Initialize the event */ + KeInitializeEvent(&Event, NotificationEvent, FALSE); + + /* Call the asynchronous version */ + Status = IoReportTargetDeviceChangeAsynchronous(PhysicalDeviceObject, + NotificationStructure, + IopClearEvent, + &Event); + + /* Only wait if we succeeded */ + if (NT_SUCCESS(Status)) + { + /* Wait for it to complete */ + KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL); + } + + /* Return status */ + return Status; }
/*