mirror of
https://github.com/reactos/reactos.git
synced 2024-10-06 01:13:38 +00:00
- 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:
parent
be1e76002e
commit
018ceb886d
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue