IoSetCompletionRoutineNonPnpDriver rule (wdm)
The IoSetCompletionRoutineNonPnpDriver rule specifies that drivers that are not PnP drivers should use IoSetCompletionRoutineEx not IoSetCompletionRoutine.
The IoSetCompletionRoutineEx routine avoids the actual driver image unloading after the driver has been marked for unload. This applies to non-PnP drivers since they are not notified by the PnP manager when a remove or unload is happening.
Driver model: WDM
How to test
At compile time |
---|
Run Static Driver Verifier and specify the IoSetCompletionRoutineNonPnpDriver 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. |