MiniportOnlyWdmDevice rule (kmdf)
The MiniportOnlyWdmDevice rule specifies that WDF drivers should not use IoCreateDevice and IoCreateDeviceSecure functions to create bare WDM device objects. This will cause a the computer to crash if someone tries to send an IRP to the WDM device. This is because IRP dispatch entries of the device are set to WDF-specific entries, but the framework hasn’t created a WDF device. However, miniport drivers can use the DDIs because driver dispatch entry points aren’t set for them.
Driver model: KMDF
How to test
At compile time |
---|
Run Static Driver Verifier and specify the MiniportOnlyWdmDevice 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. |
Applies to
Feedback
Submit and view feedback for