Author: fireball
Date: Sat Apr 25 13:07:10 2009
New Revision: 40693

URL: http://svn.reactos.org/svn/reactos?rev=40693&view=rev
Log:
- Fix driver object type DeleteProcedure so that it actually unloads driver's 
image.
- Make IopUnloadDriver work accordingly (it shouldn't try to unload an image 
when its object has already been deleted). Drivers can now be unloaded in 
ReactOS, this probably fixes a number of hardware-related applications and 
applications using hardware protection.

Modified:
    trunk/reactos/ntoskrnl/io/iomgr/driver.c

Modified: trunk/reactos/ntoskrnl/io/iomgr/driver.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/driver.c?rev=40693&r1=40692&r2=40693&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1] Sat Apr 25 13:07:10 
2009
@@ -72,7 +72,7 @@
     if (DriverObject->DriverSection)
     {
         /* Unload it */
-        //LdrpUnloadImage(DriverObject->DriverSection);
+        MmUnloadSystemImage(DriverObject->DriverSection);
     }
 
     /* Check if it has a name */
@@ -1109,9 +1109,6 @@
       ObDereferenceObject(DriverObject);
       ObDereferenceObject(DriverObject);
 
-      /* Unload the driver */
-      MmUnloadSystemImage(DriverObject->DriverSection);
-
       return STATUS_SUCCESS;
    }
    else

Reply via email to