- Implement IRP_MN_REMOVE_DEVICE handling for FDOs

svn path=/trunk/; revision=47723
This commit is contained in:
Cameron Gutman 2010-06-09 20:12:27 +00:00
parent 8ebc45f80b
commit 186dc06a99

View file

@ -551,10 +551,6 @@ FdoPnpControl(
case IRP_MN_QUERY_STOP_DEVICE:
Status = STATUS_NOT_IMPLEMENTED;
break;
case IRP_MN_REMOVE_DEVICE:
Status = STATUS_NOT_IMPLEMENTED;
break;
#endif
case IRP_MN_START_DEVICE:
DPRINT("IRP_MN_START_DEVICE received\n");
@ -579,7 +575,14 @@ FdoPnpControl(
case IRP_MN_FILTER_RESOURCE_REQUIREMENTS:
break;
case IRP_MN_REMOVE_DEVICE:
DPRINT1("IRP_MN_REMOVE_DEVICE is UNIMPLEMENTED!\n");
/* Detach the device object from the device stack */
IoDetachDevice(DeviceExtension->Ldo);
/* Delete the device object */
IoDeleteDevice(DeviceObject);
/* Return success */
Status = STATUS_SUCCESS;
break;
default:
DPRINT1("Unknown IOCTL 0x%lx\n", IrpSp->MinorFunction);