Aric Stewart : ntoskrnl.exe: Implement removing plug and play devices.
Alexandre Julliard
julliard at winehq.org
Wed Sep 21 10:14:51 CDT 2016
Module: wine
Branch: master
Commit: b8ac3d7684b9990974a60f4f2fcf06d88f9f94f5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b8ac3d7684b9990974a60f4f2fcf06d88f9f94f5
Author: Aric Stewart <aric at codeweavers.com>
Date: Wed Sep 21 13:38:21 2016 +0200
ntoskrnl.exe: Implement removing plug and play devices.
Signed-off-by: Aric Stewart <aric at codeweavers.com>
Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntoskrnl.exe/ntoskrnl.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 93029a4..522facf 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -3064,6 +3064,16 @@ static void handle_bus_relations( DEVICE_OBJECT *device )
}
+static void handle_removal_relations( DEVICE_OBJECT *device )
+{
+ TRACE_(plugplay)( "(%p)\n", device );
+
+ send_power_irp( device, PowerDeviceD3 );
+ send_pnp_irp( device, IRP_MN_SURPRISE_REMOVAL );
+ send_pnp_irp( device, IRP_MN_REMOVE_DEVICE );
+}
+
+
/***********************************************************************
* IoInvalidateDeviceRelations (NTOSKRNL.EXE.@)
*/
@@ -3076,6 +3086,9 @@ void WINAPI IoInvalidateDeviceRelations( DEVICE_OBJECT *device_object, DEVICE_RE
case BusRelations:
handle_bus_relations( device_object );
break;
+ case RemovalRelations:
+ handle_removal_relations( device_object );
+ break;
default:
FIXME( "unhandled relation %i\n", type );
break;
More information about the wine-cvs
mailing list