- 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.

svn path=/trunk/; revision=40693
This commit is contained in:
Aleksey Bragin 2009-04-25 09:07:10 +00:00
parent be1e76002e
commit 018ceb886d

View file

@ -72,7 +72,7 @@ IopDeleteDriver(IN PVOID ObjectBody)
if (DriverObject->DriverSection)
{
/* Unload it */
//LdrpUnloadImage(DriverObject->DriverSection);
MmUnloadSystemImage(DriverObject->DriverSection);
}
/* Check if it has a name */
@ -1109,9 +1109,6 @@ IopUnloadDriver(PUNICODE_STRING DriverServiceName, BOOLEAN UnloadPnpDrivers)
ObDereferenceObject(DriverObject);
ObDereferenceObject(DriverObject);
/* Unload the driver */
MmUnloadSystemImage(DriverObject->DriverSection);
return STATUS_SUCCESS;
}
else