DeleteDevice rule (wdm)
The DeleteDevice rule specifies that drivers should not rely on the I/O Manager or PnP Manager to keep the DeviceObject alive after a call to IoDeleteDevice.
Drivers should call IoDeleteDevice after the lower driver has returned. This is the recommended behavior. This rule applies to FDO and FIDO drivers.
How to test
|At compile time|
Run Static Driver Verifier and specify the DeleteDevice rule.Use the following steps to run an analysis of your code:
For more information, see Using Static Driver Verifier to Find Defects in Drivers.