From d94c54c3a77af715ec5714899dd5a81ed5e55bb9 Mon Sep 17 00:00:00 2001 From: Stefan Ginsberg Date: Mon, 18 Aug 2008 13:31:33 +0000 Subject: [PATCH] - Implement IoReportTargetDeviceChange as a wrapper around the unimplemented IoReportTargetDeviceChangeAsynchronous svn path=/trunk/; revision=35428 --- reactos/ntoskrnl/io/pnpmgr/pnpreport.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpreport.c b/reactos/ntoskrnl/io/pnpmgr/pnpreport.c index e11c4b0263e..d7b6d71bef2 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpreport.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpreport.c @@ -119,8 +119,27 @@ NTAPI 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; } /*