[Wine-patches] [eterhack] [0016/0021] parport.sys: Add DriverUnload routine.

Alexander Morozov =?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Ср Янв 28 21:10:13 MSK 2009


---
 dlls/parport.sys/parport.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/dlls/parport.sys/parport.c b/dlls/parport.sys/parport.c
index fc7aa3f..1bf7c32 100644
--- a/dlls/parport.sys/parport.c
+++ b/dlls/parport.sys/parport.c
@@ -149,8 +149,23 @@ static void enum_par_devices( DRIVER_OBJECT *driver )
 }
 #endif  /* HAVE_LIBIEEE1284 */
 
+static void WINAPI parport_unload( DRIVER_OBJECT *driver )
+{
+#ifdef HAVE_LIBIEEE1284
+    DEVICE_OBJECT *device = driver->DeviceObject, *device2;
+
+    while (device)
+    {
+        device2 = device->NextDevice;
+        IoDeleteDevice( device );
+        device = device2;
+    }
+#endif
+}
+
 NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path )
 {
+    driver->DriverUnload = parport_unload;
 #ifdef HAVE_LIBIEEE1284
     driver->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = parport_ioctl;
     enum_par_devices( driver );
-- 
1.6.0.2.GIT



Подробная информация о списке рассылки Wine-patches